Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Incremental Load Error

I'm trying to implement incremental load. Can someone tell me why this code is not working? A straight load works just fine. I'm not sure what I'm missing.

Temp_Transactions:

LOAD Max(TransactionDate) as Max_Day

FROM

[..\QVD\Transactions.qvd](qvd);

let MaxDate = peek('Max_Day',-1,Temp_Transactions);

drop table Temp_Transactions;

Transactions:

LOAD StoreID,

    TellerID,

    CustomerID,

    TransactionID,

    ID,

    TransactionDate,

    TransactionType,

    TransactionUnits,

    TransactionAmount,

    TransactionFees,

    TransactionSalesTax,

    TransactionDesc,

    MakerBankRouter,

    CheckTypeCode,

    CorpID,

    MiscCode,

    UBCode,

    CouponCode

FROM

[..\QVD\Transactions.qvd](qvd);

Concatenate

LOAD StoreID,

    TellerID,

    CustomerID,

    TransactionID,

    ID,

    TransactionDate,

    TransactionType,

    TransactionUnits,

    TransactionAmount,

    TransactionFees,

    TransactionSalesTax,

    TransactionDesc,

    MakerBankRouter,

    CheckTypeCode,

    CorpID,

    MiscCode,

    UBCode,

    CouponCode;

SQL SELECT *

FROM QlikViewDB.dbo."dbo_Transactions"

where TransactionDate = $(MaxDate);

Store Transactions into ..\QVD\Transactions.qvd;

Drop Table Transactions;

1 Solution

Accepted Solutions
Not applicable
Author

So, its my store statement. I commented it out and the script succeeded.

So I added the "s" to tables and it worked. Weird....

View solution in original post

3 Replies
johnw
Champion III
Champion III

Perhaps use TransactionDate >= $(MaxDate)?

Not applicable
Author

Nope, that didn't do it. I originally had just ">" in the expression.

I just don't get it.

Not applicable
Author

So, its my store statement. I commented it out and the script succeeded.

So I added the "s" to tables and it worked. Weird....