Skip to main content

I have an FME-workbench, and eventually I want my data to be stored in a postgreSQL database. This works perfectly fine with the PostgreSQL-writer.

 

However, I need to populate multiple tables which underlie several constraints. Thus, the order of when what reader is run, matters.

 

Moreover, I would like to instantly read the written data for further manipulation (my DB automatically generates an ID (by a sequence) which I need to merge to other tables as a foreign key before writing those tables to my DB).

 

Any help much appreciated!

Readers are read in depending on the order they appear in the Navigator window. From top to bottom. You can either right click and select Move Up or Move Down or drag and drop to reorder them.

 

To write data out and read back in use FeatureWriters and FeatureReaders rather than normal Writers and Readers.


Readers are read in depending on the order they appear in the Navigator window. From top to bottom. You can either right click and select Move Up or Move Down or drag and drop to reorder them.

 

To write data out and read back in use FeatureWriters and FeatureReaders rather than normal Writers and Readers.

I agree with @Gary Nicholson​, if the order in which readers and writers happen is important you're going to want to use FeatureReaders and FeatureWriters. The SQLCreator and SQLExecutor might come in handy too.


Readers are read in depending on the order they appear in the Navigator window. From top to bottom. You can either right click and select Move Up or Move Down or drag and drop to reorder them.

 

To write data out and read back in use FeatureWriters and FeatureReaders rather than normal Writers and Readers.

Thanks for your answers. However I have still two questions:

1) I can, indeed, reorder the Readers and Writers, however, I have one single Writer to a postgreSQL-connection so far, writing out data to different tables. But anyhow I cannot order the order of these different tables within this one Writer

2) How can I write out data and read it back immediately using the FeatureWriter and/or FeatureReader?


1) When faced with this I usually create multiple writers even though they are the same format. There are some tricks using Creators/FeatureMergers/FeatureHolders that allow you control when things are written as well.

2) But Feature Writers and Readers can give more control. If you need to read data back in after writing then do this

Untitled3) I agree with @Hans van der Maarel​ the SQLExecutor is worth looking at with PostgreSQL.


Reply