Question

How to create an Oracle relation....best practice

  • 21 November 2018
  • 1 reply
  • 0 views

From reading one Oracle table I'm inserting entries into two other tables, and they should be farther-son related based on the ID-primekey field.

However, I can only insert the farther entry. When inserting the son entry containing the relational ID of the farther, FME says, it's missing (or maybe not committed yet).

This must be a common known problem, so can anyone help?


1 reply

Userlevel 4

Here's an article that explains it fairly well:

https://knowledge.safe.com/articles/44622/working-with-foreign-keys-writing-database-tables.html

Personally I tend to use the SQLExecutor when possible, it lets me control the insert order and transactions with a lot of precision.

Another good option would be to use two FeatureWriters, one for the partents and one for the children, chained in a sequence either by activating the output of the input features, or by using a FeatureMerger on the Summary port to trigger the second FeatureWriter. Something like

Reply