updating a target table column using a lookup

Who is online?  0 guests and 1 members
Home  »  Forums   »  microsoft business intelligence   »  integration services   » updating a target table column using a lookup

updating a target table column using a lookup

Topic RSS Feed

Posts under the topic: updating a target table column using a lookup

Posted: 3/23/2012

Padawan 189  points  Padawan
  • Joined on: 6/14/2010
  • Posts: 67

Hi

I have a table_src

ID,name,currency 

lookup table d_currency

curency_sk,currency

table_dest

id,currency_sk

 

I need to update/ insert the currency_sk into the table_dest  using the lookup,   . how can this be done. the Id's are already in the table_dest. how can i map the id's in both the tables

 


Posted: 3/25/2012

Jedi Youngling 18  points  Jedi Youngling
  • Joined on: 4/7/2010
  • Posts: 4
Answered  Answered

SQL Server Integration Services (SSIS) provides a data flow transformation called "Lookup" for this purpose. 

In SSIS, create a data flow task in the control flow.  In the data flow, create your source data flow.  From the Data Flow Transformations, drop a "Lookup" from the "Data Flow Transformation" tools.  In the lookup, choose Cache Mode ( I suggest "Full Cache" for a currency lookup because this has few records.)  In connection choose your table or use your own SQL query if necessary.  In columns, map your source column to the lookup (table or query) column.  Choose the desired output. The output column will be available for your data flow destination.

I couldn't tell exactly what columns you are interested in from your questio, but I think this will provide your solution.


Posted: 3/27/2012

Padawan 189  points  Padawan
  • Joined on: 6/14/2010
  • Posts: 67

Hi Steve,

I have used the lookup transformation on a table to get the SK into a stg_table , then used the execute sql stagement to update the  Fact table holding all the SK's . im talking records from 2003 to 2012 ~ 900 million records, the update takes 2-3 hrs (for 6months range)and as we are using 2005 it fails saying transaction_logs is full  and i have had this problem on 2005 so im using only  smaller subsets like 6months at a time . 

Is there a quicker way, just a curious question.


Page 1 of 1 (3 items)