Skip to main content
Question

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

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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