Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I'm fairly new to the concept of incremental load in qlik and I understand that we require the modified date info to
load only the new records or update an existing one.
But in my source table, we are not capturing the modified date and I was wondering if i could implement it on the basis of Order_Number.
For ex: Existing records
Order_Number ModeofTransport
234 Truck
567 Sea
890 Truck
then when I load the same file again which has new/modified data
Order_Number ModeofTransport
234 Airfreight
997 Truck
1002 Sea
Final result
Order_Number ModeofTransport
234 Airfreight - Updated
567 Sea - Old
890 Truck - Old
997 Truck - New
1002 Sea - New
So as you can see, based on the order number, I want to implement the incremental load.
Please let me know if there's any way to achieve this as i need to get this done soon.
Thanks!
Pranav
Please have a look at below.
You can modify the script to your requirement.
https://www.analyticsvidhya.com/blog/2014/09/qlikview-incremental-load/
Hi @pranaview
I have used it using the modified date always. There might be some way to do that but that would not be optimized as it would involve comparing each row . Below is the Qlik help link and it too contains a field called modified time.
In this case we need to compare the combo of occurrence, where ID will be unique.
Check out this below code, with only update and delete scenario into this.
Inc: LOAD Order_Number&'|' & ModeofTransport as ID FROM Incr.xlsx (ooxml, embedded labels, table is Sheet1); LOAD ID FROM Inc.qvd (qvd)Where not Exists (ID); Inner Join LOAD Order_Number&'|' & ModeofTransport as ID FROM Incr.xlsx (ooxml, embedded labels, table is Sheet1); Store Inc into Inc.qvd(qvd); Drop table Inc; Main_Load: Directory; LOAD Subfield(ID,'|',1) as Order_Number, Subfield(ID,'|',2) as ModeofTransport FROM Inc.qvd (qvd);
PFA QVW for ref.
i suggest you to pick the modified time of any record in the table, so that it will be way easy to trace and load only those recently Updated. Beside loading the complete data, as incremental load meant that only.
Please close the thread. 🙂