Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 Columns | Additional Columns | ||
SrcCd | DateModified | SrcCd | DateModified |
QADCC | 3-Mar-09 | QADCC | 9-Mar-09 |
QADCC | 4-Mar-09 | QADCC | 10-Mar-09 |
QADCC | 5-Mar-09 | QADCC | 11-Mar-09 |
QADCC | 6-Mar-09 | QADCC | 12-Mar-09 |
QADCC | 7-Mar-09 | QADCC | 13-Mar-09 |
QADCC | 8-Mar-09 | QADCC | 14-Mar-09 |
QADBR | 1-Mar-09 | QADBR | 6-Mar-09 |
QADBR | 2-Mar-09 | QADBR | 7-Mar-09 |
QADBR | 3-Mar-09 | QADBR | 8-Mar-09 |
QADBR | 4-Mar-09 | QADBR | 9-Mar-09 |
QADBR | 5-Mar-09 | QADBR | 10-Mar-09 |
QADCH | 3-Mar-09 | ||
QADCH | 4-Mar-09 | ||
QADCH | 5-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
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);