Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can someone please tell me why my implement load keep failing? Even when I comment out the variable vLastRunTime and the QVDs to implement load on and just store small table QVDs....it still fails. I'm attaching my scripting for the QVDs.
Any help would be appreciated.
Thanks in Advance,
May sound weird this, but try putting a Sleep(9000) after the STORE.
Thanks Sunny. This script doesn't give an error but it's not loading the latest data from the database. The database shows a total count of customercuration table 295K rows while the below shows 293K rows.
I guess that goes back to the issue that you have specified the variable before the incremental load, while I think you should do it at the end of the script to give it a value for next time onwards. I have probably mentioned this before as well, but try this:
One Time:
CustomerCuration:
SQL SELECT *
FROM "rbc_dw"."open".dim1customercuration;
LET vLastRunTime = Date(Today(), 'DD-MMM-YYYY');
Incremental:
ODBC CONNECT TO ExcessionProd;
CustomerCuration:
SQL SELECT *
FROM "rbc_dw"."open".dim1customercuration
Where updatedate > '$(vLastRunTime)';
Concatenate(CustomerCuration)
LOAD *
FROM
(qvd)
where not exists (pkdim1customercuration);
STORE CustomerCuration INTO CustomerCuration.qvd (qvd);
LET vLastRunTime = Date(Today(), 'DD-MMM-YYYY');
NOTE: The position of the variable -> vLastRunTime is at the bottom of the script and not at the top while doing the incremental load. This is very very important thing to note, if you don't follow this, the results are more likely then not going to deviate.
Can you try deleting .qvd from the location and try the reload?
Thanks guys for all your help but it's still providing me with the number of rows I had from last week. Sunny I've tried placing the vLastRunTime variable towards the end of my script but still no fruition.
For just one time, can you try this:
LET vLastRunTime = Date(Today()-1, 'DD-MMM-YYYY');
ODBC CONNECT TO ExcessionProd;
CustomerCuration:
SQL SELECT *
FROM "rbc_dw"."open".dim1customercuration
Where updatedate > '$(vLastRunTime)';
Concatenate(CustomerCuration)
LOAD *
FROM
(qvd)
where not exists (pkdim1customercuration);
STORE CustomerCuration INTO CustomerCuration.qvd (qvd);
Thanks Sunny for the response.
Didn't work Kush141087.
What do you get for this?
CustomerCuration:
SQL SELECT *
FROM "rbc_dw"."open".dim1customercuration;
I get 184 rows.