kdb - Construct q command to get metadata for all tables -


i'd construct query retrieve table metadata each table.

i can metadata single table "meta" function. can chain "tables `.", returns of tables in '.' namespace, construct "(meta')tables `.".

this want returns list of metadata tables. problem dont know metadata table belongs kdb table.

ideally, construct query returns table each row tablename + results of "meta tablename". advice constructing such query?

q)trade:([] sym: 10?`4; time:10?.z.t; prx:10?100f; sz:10?10000); q)quote:([] sym: 10?`4; time:10?.z.t; bprx:10?100f; aprx:10?100f; bsz:10?10000; asz:10?10000); q)testtable:update `s#a ([] a:til 10; b: 10?`3; c:10?.z.p); q)raze {update table:x 0!meta x}'[tables[]]     c    t f table     --------------------     sym  s     quote     time t     quote     bprx f     quote     aprx f     quote     bsz  j     quote     asz  j     quote        j   s testtable     b    s     testtable     c    p     testtable     sym  s     trade     time t     trade     prx  f     trade     sz   j     trade 

i construct query returns table each row tablename + results of "meta tablename". advice constructing such query?

if did want in manner, there many ways. 1 example:

q)update tablemeta:meta'[table] ([] table:tables[])     table     tablemeta     --------------------------------------------------------------------------------     quote     (+(,`c)!,`sym`time`bprx`aprx`bsz`asz)!+`t`f`a!("stffjj";``````;``````)     testtable (+(,`c)!,`a`b`c)!+`t`f`a!("jsp";```;`s``)     trade     (+(,`c)!,`sym`time`prx`sz)!+`t`f`a!("stfj";````;````)