Question

How to create foreign key with oracle writer after creating tables ? (one to one)

  • 4 January 2022
  • 2 replies
  • 2 views

Badge

Table1

pTable2

table 2 

Reader data from soap and writer is oracle spatial object.

I use inline querier and featureMerger for using xml hierarcy that is "STATUS_REASON_SEQ_ID ". So, I merged two tables and created. But I expect to see foreign key(references Table2 (SEQ_ID)) in Table1.

What should I use in this case. ?


2 replies

Userlevel 2
Badge +17

Hi @ikubra800​ , I think you can execute a SQL statement to add a foreign key to the Table 2 by setting the statement to the "SQL to Run After Write" parameter in the Oracle writer.

Alternatively, you can also execute SQL statements to create the destination tables including the foreign key constraint beforehand, by setting the "SQL to Run Before Write" parameter.

Badge

Thanks for the response @Takashi Iijima​ 

I solved with two FeatureWriter and SQLExecutor.

Reply