Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to update few fields in my QVD. I don't want to go for incremental load, How can i do it.
Here is the scenario:
ID | Date |
1 | 1/1/2015 |
2 | 1/1/2015 |
3 | 1/2/2015 |
4 | 1/3/2015 |
5 | 1/4/2015 |
6 | 1/1/2015 |
Over here, i want to update the date for ID=2,4,5 to 2/2/205,2/3/2015,4/5/2015.
Regards
KC
Hi,
Using below 2 ways you can do that,
1: In Database itself update it and then at extraction level use normal select query.
2: If for limited ID you want to do that then go for If else
like
if(id=2,'2/2/2015',if(id=3,'2/3/2015',Date)) as New_date
Note : Carefull with date format.
Regards
LOAD the new values first, then your historic data using a WHERE NOT EXISTS(ID) clause.
QVD files should be seen as one big inseparable block of data. No changing individual rows, sorry. Go for the classic LOADinRAM-MODIFY-STOREtoDISK approach.
There are third-party utilities that can edit QVD files.
Though use at your own risk on live data!
Reloading, updating and storing the QVD again through Qlik is a safer option.
Sorry cant do this, i need to make changes on the extraction layer and already its very complicated with lots of concatenation and joins.
Regards
KC
Hi,
Using below 2 ways you can do that,
1: In Database itself update it and then at extraction level use normal select query.
2: If for limited ID you want to do that then go for If else
like
if(id=2,'2/2/2015',if(id=3,'2/3/2015',Date)) as New_date
Note : Carefull with date format.
Regards
What I proposed is an incremental LOAD with update option. You can check the QV cookbook, it's explained in more detail there.
Why can't you do it that way?
DATA:
LOAD ID, Date
FROM NewValues;
LOAD ID, Date
FROM Historic.qvd (qvd)
WHERE NOT EXISTS(ID);
STORE DATA into Historic.qvd (qvd);
You can use mapping table to update the date in main table and then store the qvd
MAP:
mapping LOAD * Inline [
ID, Date,
2, 2/2/205
4, 2/3/2015
5, 4/5/2015];
Data:
LOAD *,ApplyMap('MAP',ID, Date) as Update_Date Inline [
ID, Date
1, 1/1/2015
2, 1/1/2015
3, 1/2/2015
4, 1/3/2015
5, 1/4/2015
6, 1/1/2015 ];
STORE Data into Data.qvd;
Hi Peter,
Can you please explain me a bit more.
I have a sheet which i used as initial load, later i updated the QVD by concatenating it with Other data. Now I want to make changes in the historic data with out altering the current data in qvd.
Regards
KC
Thanks Max,
I thought if condition wont work, so never tried . I just missed that.
Regards
KC