Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I wanted to know how would I (if possible) write to a CSV file in the QlikView Script and append to that file every reload thats done.
Example:
STORE "SomeDataTable" INTO "CSVDump.txt" (txt); //But the next time the reload happens the data in "SomeDataTable" must be appended to the CSV File
Thanks in advance,
Krisen
Hi Krisen,
There is no such statement as "APPEND" but you can do a two step load / store that will keep your old information besides the new records. Take a look at the following example:
SomeDataTable: // already existing records in your CSV file
LOAD *
FROM CSVDump.txt (options here);
NewRecords: // With same structure, field names and number of fields as in the table above
CONCATENATE (SomeDataTable) LOAD *
FROM NewData;
// Now the table "SomeDataTable" has both old and new rows
STORE "SomeDataTable" INTO "CSVDump.txt" (txt);
Hope that helps.
Miguel
Hi, refer to help as "Incremental Reload"
Hi,
I suggest go for incremental load for the data and then make the csv.
Regards,
Anand
Thanks guys for the guidance, i will have a look into the solutions.
The "source" data is actually a timestamp, one before loading and one after loading completes.
So in essence:
PSEUDO:
SET startTime = <timestamp>
STORE startTime to CSV
LOAD DATA
SET endTime = <timestamp>
Incremental Store endTime to CSV
Making sense?