This discussion is archived
4 Replies Latest reply: Sep 14, 2012 12:12 AM by 961590 RSS

Transformation Script - Create Foreign Key

961590 Newbie
Currently Being Moderated
Hi,

I'm currently trying to write a transformation script that creates a new foreign key, but I can't quite seem to get it to work.

Given the following variables, could someone quickly explain the steps I need to go through?

model // The model variable provided to the script
source_table // a 'Table' object, representing the source table. Assume it has a primary key "id"
target_table // a 'Table' object, representing the target table. Assume it has a primary key "id", and a column "source_id" to be used as the foreign key.


Thanks

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points