Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
roisolberg
Creator
Creator

storing into CSV only as incremental

Hi Everyone,

I made a daily report that i store into a CSV file, at the moment i'm storing complete loads of the data.

i want to store only the increment to the CSV file,

I thought about numbering the records and then making some variable to be the last loaded record

and then the next load will only load the records bigger then that number.

or adding RowNo() (=ID), then making a new variable to be the maximum  (last row =MaxID)

and finally storing where ID<(Max(RowNo())-MaxID)

but i was'nt able to translate my idea to a correct syntax

any ideas on how to do it?

Thanks!

7 Replies
YoussefBelloum
Champion
Champion

Hi,

how are you defining the incremental load?

roisolberg
Creator
Creator
Author

Hi Youssef,

Actually, i've tryed to do this without incremental load.

YoussefBelloum
Champion
Champion

Ok,

when you say: "i want to store only the increment to the CSV file," what is the definition of incremental for you ?


it is every new reload? it is new daily, weekly, monthly data ?

roisolberg
Creator
Creator
Author

This is a daily report that takes the data from qvd's that are updated every few hours.

i want to keep sending the report daily, but not the entire report, just the new records that was generated since i last stored the report.

Thanks.

roisolberg
Creator
Creator
Author

for example lets say that yesterday the file had 100 rows, and since then another 10 was added,

i want to store into the file only the 10 that was added since last load(when there was 100)

thanks!

imhappiee
Contributor III
Contributor III

Hi

add reload time

reloadtime() as reloadtimer

in the load script of incremental load


and do a resident load on that table to pull the data which has max(reloadtimer)

like where reloadtimer=max(reloadtimer)


and then store this table in to csv.

done


Anand

roisolberg
Creator
Creator
Author

Thanks Anand,

If i do 'where reloadtimer=max(reloadtimer)' this won't give me a single value?