2015.05.11 07:50 AM
-------- Original Message --------
Subject: [personal kdb+] Iterate saving down a table
From: John Smith <js610308@gmail.com>
Date: Mon, May 11, 2015 7:37 am
To: personal-kdbplus@googlegroups.com
Hi,
I'm trying to save down a date partitioned table to disk. Using the .Q.dpft[':/path/to/location;.z.d;'sym;'tablename].
This woks fine. I want to do this multiple times at end of day to the various tables that exist., and so I'd like to enclose this in a function, and pass the table name(s)in iteratively, saving down each one, one at a time. But how do I do this given I won't be writing the explicit name of the table for the last parameter, rather the local parameters name, so I think this doesn't work.
Eg
savedata:{[tab;dt] .Q.dpft['/home/dir/hdb;dt;'sym;'tab];}
savedata[t;.z.d-1]. //t is table saved in memory.
Regard, John
--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to personal-kdbplus+unsubscribe@googlegroups.com.
To post to this group, send email to personal-kdbplus@googlegroups.com.
Visit this group at http://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/d/optout.
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.