6 Replies Latest reply: Oct 13, 2011 9:42 AM by deepakrajan RSS

    Loading 2 Fact tables not sharing all primary key columns

      Hi,

       

      I am having issues with loading 2 fact tables (combining them into 1). As the tables do not share all key columns (Dist_id is missing in Fact2, please see below script), I am getting unexpected results.

       

      Can anyone suggest the best approach?  I have tried link tables, while they work fine, the performance is really slow and also the qvw file size goes up 10x the original size which is not needed as I need to load many more records.

       

      Thanks,

      Deepak

       

      Fact:

      NoConcatenate

      LOAD

           TEXT(Dist_id) as %_Dist_ID,

           TEXT(Brand) as %_Brand_ID,

           DATE(T_date) as %_Day_Date_ID,

           Fact1

      FROM

      Fact1.csv

      (txt, unicode, embedded labels, delimiter is '\t', msq);

      concatenate(Fact)

      LOAD

           TEXT(Region_id) as %_Region_ID,

           TEXT(Brand) as %_Brand_ID,

           DATE(T_date) as %_Day_Date_ID,

           Fact2

      FROM

      Fact2.csv

      (txt, unicode, embedded labels, delimiter is '\t', msq);