Skip to main content
Question

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

  • November 21, 2018
  • 1 reply
  • 5 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

david_r
Celebrity
  • November 21, 2018

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings