GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Data Warehousing  >  ETL

 Print  |  
Question:  Can anyone please explain why and where do we exactly use the lookup tranformations.

thanks in advacne

thanks
nayana




May 05, 2008 07:09:03 #5
 jryan999   Member Since: April 2008    Total Comments: 14 

RE: Can anyone please explain why and where do we exactly use the lookup tranformations.thanks in advacnethanksnayana
 

You need Lookup Transformations because Dimension Tables are linked to Fact tables by Surrogate Keys.  

The Surrogate Key is automatically generated within the warehouse, and the ONLY way to find the surrogate key is to look up a Dimension table using the Natural (or Business Key).  

The surrogate key value of the Dimension is then stored against the Fact table to complete the Foreign Key relationship from Fact to Dimension.

Eg.   SALESMAN_DIMENSION

 SALESMAN_ID               Number  not null                  (Surrogate / Primary Key)
SALESMAN_CODE           Varchar2(10)         not null  (Business Key)
SALESMAN_NAME           Varchar2(30)
...Other attributes

Incoming sales records may be recorded against salesman AF293F, and you must perform a lookup using SALESMAN_CODE to find the primary key identifier SALESMAN_ID.  This sequence number is stored against the Fact table, which may identify for example, a single sale completed by this person.

Surrogate keys, keep the warehouse independent from the source systems (which can and will change), and minimise row length on large fact tables.  (eg. 10 million sales records with a 10 character Salesman Code would be use considerably more space than a single 2 byte numeric field).

 

     

 

Back To Question