Showing results for 
Search instead for 
Did you mean: 

RE: [personal kdb+] Iterate saving down a table

New Contributor
X-Originating-IP: Workspace Webmail 5.14.0Message-Id: <>From: "David Demner \(AquaQ\)" To: personal-kdbplus@googlegroups.comSubject: RE: [personal kdb+] Iterate saving down a tableDate: Mon, 11 May 2015 07:50:56 -0700Mime-Version: 1.0
You would have to pass in the table name as the parameter, like so:

savedata:{[tab;dt] .Q.dpft[`:/home/dir/hdb;dt;`sym;tab];}

and then something like
savedata[;.z.d-1]each tables[]
(assuming all tables should be parted by sym)

-------- Original Message --------
Subject: [personal kdb+] Iterate saving down a table
From: John Smith <>
Date: Mon, May 11, 2015 7:37 am


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.
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
To post to this group, send email to
Visit this group at
For more options, visit