Skip to main content

Hi,

While writing to the writer transformer(database), if it is failed in between (after writing 1000 features), then i need to take backup before starting the process and write this to the database..

Please suggest any solution.

Cheers,

Srikanth Dasari

What constitutes a failure? If you can identify that and filter off the failed feature(s) you could identify which transaction it's within. The ModuloCounter is good to set an ID from 1-1000, 1000-2000 etc to identify where the issue is. ExpressionEvaluator then using the Floor function on that ID would give you the group. Better thiigh to filter out bad features altogether and either use FME to clean them or address them later once the good data is loaded.


What constitutes a failure? If you can identify that and filter off the failed feature(s) you could identify which transaction it's within. The ModuloCounter is good to set an ID from 1-1000, 1000-2000 etc to identify where the issue is. ExpressionEvaluator then using the Floor function on that ID would give you the group. Better thiigh to filter out bad features altogether and either use FME to clean them or address them later once the good data is loaded.

Hi 1spatialdave,

 

 

Thanks for the response. However, due to some bad network connectivity.. it got disconnected and connected... in this case??? process will write 1000 features then it will stop rest of them...

 

 

Cheers,

 

Srikanth Dasari

 

 


Hi @kanthsri74, do you want the features that were written to the database to be rolled back or have those first 1000 committed and then continue to load the database where you left off? Which database are you writing to?
Hi 1spatialdave,

 

 

Thanks for the response. However, due to some bad network connectivity.. it got disconnected and connected... in this case??? process will write 1000 features then it will stop rest of them...

 

 

Cheers,

 

Srikanth Dasari

 

 

Perhaps worth trying to connect to the database in a different way then to see if that makes the connection more stable. There are lots of JDBC drivers you can use to connect using the FME JDBC (Java Database Connectivity) readers and writers. The other thing you could look at is that some of the database writers have a writer parameter to help in these issues, the MS SQL Server writer for example allows you to extend the communication timeout value greater than the default 30 seconds. The Oracle Writer allows you to make the connection 'persist'... depending on what database you're connecting to these might help.

 

 

Other than that you'll have to log the ID of the last feature you managed to successfully write by reading back the ID from the target table in a separate process, then pass that number +1 as the start ID to send to say a FeatureReader and populate the 'Start Feature' value with that number so that you read from where the writing failed.

 


Reply