Solved

Prioritize the Writing of Data to a database


Badge

Hi,

I have 3 writers (feature types), all PostgreSQL connected to the same schema but different tables. The second writer should be the first to be written, then the third and so on. This is because of the dependency of the primary key of one writer as the foreign key in the second writer.

Can we fix this writing process?

I tried the feature holder, connection runtime order, but no luck yet. Also tried the file writer, however, the required attributes are not written. Any quick solutions that I am missing out on?

 

Thanks!

icon

Best answer by david_r 9 March 2021, 13:21

View original

2 replies

Userlevel 4

Generally speaking I would recommend using the FeatureWriter transformer to write these features.

Have you looked at this article: https://community.safe.com/s/article/working-with-foreign-keys-writing-database-tables

And perhaps also this: https://community.safe.com/s/article/write-feature-types-in-a-specific-order

FME 2021 also introduces a Group By in the FeatureWriter which will simplify this even further.

Badge

Generally speaking I would recommend using the FeatureWriter transformer to write these features.

Have you looked at this article: https://community.safe.com/s/article/working-with-foreign-keys-writing-database-tables

And perhaps also this: https://community.safe.com/s/article/write-feature-types-in-a-specific-order

FME 2021 also introduces a Group By in the FeatureWriter which will simplify this even further.

I was using the FeatureWriter transformer to order my writing but was unclear about how to get attributes. Now, I can import the attribute values. Thanks @david_r​ 

I also discovered the 'Connection Runtime Order' for the first time.

Reply