Hi all, I’m new to Kdb and have been having trouble writing big tables to .Csv files under the W32 version due to WSFULL
and I am trying to work around it with .Q.fs chunking.
The following code fails with wsfull on Kdb32:
/------------------------
DeviceData:();
/ Create 12.5M Element Lists.
did: 10 + 12500000?9;
dt1: 0.000000 + 12500000?999.999999999;
dt2: 1.000000 + 12500000?999.999999999;
dt3: 2.000000 + 12500000?999.999999999;
ct: 12500000?24:00:00.000;
cd: 2016.01.01d + 12500000?31; / Jan.
cdt: “z” $ (cd + ct);
/ Create Table.
DeviceData:( DeviceId:did; Data1:dt1;Data2:dt2; Data3:dt3; CreateDate:cdt);
/ Reorder Table.
DeviceData: `CreateDate xasc DeviceData;
/ Write File to Csv Fails for more than 5Mrecords for Kdb32.
`:d:/BusLocal/Intelligo/Benchmark/DeviceData.Csv0: csv 0: DeviceData;
/------------------------
/ m trying to use .Q.fs to address this bywriting the file in chunks but Im failing miserably presumably due to bad syntax:
/ Doesnt Work - There on;y seem to be examples for reading files, not writing…
.Q.fs[{`:d:/BusLocal/Intelligo/Benchmark/DeviceData.Csv0: csv 0: x}; DeviceData];
Whats wrong with my syntax please?
Thank you,
Andrew McLaughlin
Thank you.