Skip to main content

I have made a script that writes data to Oracle database, using FeatureWriter.

Before I write data, I use FeatureReader to read number of records.

 

At the end of the script I want to know how many records there are now.

I also use FeatureReader for this.

 

The results are always the same as before and after the transactions.

 

It seems that the 2nd FeatureReader has already started before the transactions have been processed.

 

I have tried with Oracle Reader, 2nd connection parameter, SQLExecutor.

The results are always the same as before and after the transactions.

Also using Triggerer and Decelarator.

 

Something has to happen that the 2nd FeatureReader will 're-read' the table.

 

Anyone has a suggestion ?

 

Thank you in advance !

 

How do you initiate the second featurereader? It should be initiated by the featurewriters summary feature to make sure it starts after the writing is done.

 

Also, if you have featurecaching on, nothing changes for each run. Try to switch it off.


How do you initiate the second featurereader? It should be initiated by the featurewriters summary feature to make sure it starts after the writing is done.

 

Also, if you have featurecaching on, nothing changes for each run. Try to switch it off.

Hi Niels.

 

featurereader Oracle (count number of records) -> feature reader CSV/ZIP -> AttributeManager (fme_db_operation). Hereafter 2 lines : Route 1. FeatureWriter (Oracle) Route 2. Other Transformers.

 

A little further down the Route 2 I start FeatureReader to read out the number of records.

(after Triggerer and Decelarator)

 

I let the entire process run in the background (via task scheduler). Does cache affect this?

 


I believe fetaurecaching is off in batch mode.

 

But you can't place the reader in route 2 and be sure the reading is done before the writing. The reading need to be done downstream of the FeatureWriter. A trick to be sure the order is correct, is to feed the features from the AttributeManager and the outputfeature to a FeatureHolder, then use a Tester to remove the summary feature from the FeatureWriter from the stream, and do the things you want in route 2.


I believe fetaurecaching is off in batch mode.

 

But you can't place the reader in route 2 and be sure the reading is done before the writing. The reading need to be done downstream of the FeatureWriter. A trick to be sure the order is correct, is to feed the features from the AttributeManager and the outputfeature to a FeatureHolder, then use a Tester to remove the summary feature from the FeatureWriter from the stream, and do the things you want in route 2.

ExampleWriteRead 

Maybe my description wasn't very clear. I have made an image for clarification.

Hopefully you can help me further.

 

Thanks for your patience

 


ExampleWriteRead 

Maybe my description wasn't very clear. I have made an image for clarification.

Hopefully you can help me further.

 

Thanks for your patience

 

Replace your writer with a featurewriter, choose One per Feature Type for your output ports and then use that output to continue the flow

image


ExampleWriteRead 

Maybe my description wasn't very clear. I have made an image for clarification.

Hopefully you can help me further.

 

Thanks for your patience

 

thanks for your comment. Combined with your answer I got results I wanted.


Reply