user11394136
user11394136

Reputation:

Creating foreign key columns for fact table in SSIS

I'm trying to load data into my fact table using SSIS. For this purpose I need to create lookup for each dimensional table to map primary/foreign keys. But the problem is that my source datafile for fact table doesn't contain columns for foreign keys. My destination fact table contains foreign key columns and some other columns. But the source data does contain other columns but not the foreign key columns. How can I create these columns in order to map them to primary key columns of dimensional tables in Lookup?

Upvotes: 0

Views: 538

Answers (1)

Tab Alleman
Tab Alleman

Reputation: 31785

There are lots of ways to do this.

The best way, as David mentioned, is to load your source data to a staging table, and then from there use a SQL procedure to load it to your destination table.

Another way is to use the Derived column transformation to add new columns in the Dataflow task.

Upvotes: 0

Related Questions