简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM