Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am looking to do insert and update within ticket # data.
So my data is a weekly csv that gets automatically sent to a directory.
The unique key is ticket # the other fields that change are closed date and comment section.
So i want the data load to update these fields if necessary when there is a new file dropped each week.
instead of creating a duplicate when these fields have data.
Is this possible when using CSV?
(I know i can just archive or delete old CSVs, but I would like this to work without having to do that)
Thanks
This article apply to Qlik Sense as well: https://www.analyticsvidhya.com/blog/2014/09/qlikview-incremental-load/
This article apply to Qlik Sense as well: https://www.analyticsvidhya.com/blog/2014/09/qlikview-incremental-load/
Hi Tomasz,
This makes sense, the only question i have is within the incremental load.
"Where modified_date > $(Last_Updated_Date);"
Is the $(Last_Updated_Date) suppose to be a qlik function? what exactly goes here?
$(Last_Updated_date) gives you a value of variable 'Last_Updated_date' (dolar sign evaluates it).
This variable has been set by LET =(...) statement.
Oh okay, got that.
Now when i do my where clause " WHERE Closed > $(vClose);"
I receive the error = "
The following error occurred:
Field '>' not found"
Can you show us whole part of the script?
//Load data from QVD
ChangeTEST:
LOAD
Number,
State,
"Created by",
"Closed by",
Created,
"Configuration Item",
"Emergency Change",
Risk,
Stage,
"Type",
Category,
Environment,
Workflow,
Closed,
"Planned start date",
"Planned end date",
"Short Description",
"Description of Change",
Department
FROM [lib://SEC_FileShare/QVD\Users\Chris_Witman\Change_TEST.qvd]
(qvd);
//Find Last Closed Date
Last_Close_Date:
load max(Closed) as MaxClose
resident ChangeTEST;
//Store Last Close Date to a variable
Let vClose = peek('MaxClose',0,'Last_Close_Date');
//Delete ChangeTest Table
Drop Table ChangeTEST;
Incremental_Change:
LOAD
Number,
State,
"Created by",
"Closed by",
Created,
"Configuration Item",
"Emergency Change",
Risk,
Stage,
"Type",
Category,
Environment,
Workflow,
Closed,
"Planned start date",
"Planned end date",
"Short Description",
"Description of Change",
Department
FROM [lib://SEC_FileShare/Budget\Change_Control\Test\Change_Requests_*.csv]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)
WHERE Closed > $(vClose);