Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Incremental Load - 2 Columns

hi,

I am trying to do Incremental Load based on Date Modified / SrcCd

QVW Attached / Data Attached(Book1.xls)

If I just put the condition as Where   DateModified>$(vmax) , then records for a srccd which are are less than the max date are not picked


I require inputs on how to add the records which are greater than maxdate for each of the source code

Fore eg: the max date in old columns is 8 mar 09,

If I just put the maxdate condition, then QADBR data for 6 mar09 in additional columns will not be added.


I need to add the condition for max date for each of the srccd.

Please provide inputs

   

Old ColumnsAdditional Columns
SrcCdDateModifiedSrcCdDateModified
QADCC3-Mar-09QADCC9-Mar-09
QADCC4-Mar-09QADCC10-Mar-09
QADCC5-Mar-09QADCC11-Mar-09
QADCC6-Mar-09QADCC12-Mar-09
QADCC7-Mar-09QADCC13-Mar-09
QADCC8-Mar-09QADCC14-Mar-09
QADBR1-Mar-09QADBR6-Mar-09
QADBR2-Mar-09QADBR7-Mar-09
QADBR3-Mar-09QADBR8-Mar-09
QADBR4-Mar-09QADBR9-Mar-09
QADBR5-Mar-09QADBR10-Mar-09
QADCH3-Mar-09
QADCH4-Mar-09
QADCH5-Mar-09

 


 

Let vfirsttime = IsNull(QvdCreateTime('G:\DTV\Complexity Management\Data_Systems\DA_Infosys\Review_Dashboards\try.qvd'));

 

If $(vfirsttime) then

 

trace ********** initial load;

 

Try:

 

LOAD SrcCd,

      DateModified

  FROM

  G:\DTV\Complexity Management\Data_Systems\DA_Infosys\Review_Dashboards\Book1.xlsx]

  ooxml, embedded labels, table is Data);

 

//Store Initial into 'G:\DTV\Complexity Management\Data_Systems\DA_Infosys\Review_Dashboards\Initial.qvd'(qvd);

ELSE

 

trace ********** incremental;

  Max:

 

LOAD Max(DateModified) as maxdate

 

FROM

 

(qvd);

 

 

Let vmax = Peek('maxdate',0,'Max');

 

drop table Max;

 

 

//Incremental load

 

Try:

 

 

LOAD SrcCd,

 

     DateModified

 

FROM

 

 

(ooxml, embedded labels, table is Data)

 

Where   DateModified>$(vmax) ;

 

Concatenate   (Try)

 

 

LOAD SrcCd,

 

     DateModified

 

FROM try.qvd(qvd);

 

ENDIF;

 

Store Try into 'G:\DTV\Complexity Management\Data_Systems\DA_Infosys\Review_Dashboards\tryIncremental.qvd'(qvd);

 

Store Try into 'G:\DTV\Complexity Management\Data_Systems\DA_Infosys\Review_Dashboards\tryIncremental.xls'(txt);

 

 

 

0 Replies