4 Replies Latest reply: Sep 14, 2012 7:12 AM by 961590 RSS

    Transformation Script - Create Foreign Key


      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.