cancel
Showing results for 
Search instead for 
Did you mean: 

Flat Tables and Splayed Tables

diarmaid-dohert
New Contributor
Hi,

I have two tables, "quotes" and "trades" loaded within a q session.

I'm wondering is there a way I could save the "trades" table as a flat table within a subdirectory "flat" that I have created and also how I can save both "quotes" and "trades" as splayed tables in a separate subdirectory called "splay"?

Many thanks.
1 REPLY 1

Jonathan_Foster
New Contributor
Hi Diarmaid,

If you want to save a table down to a directory you have created a a flat table, you can use the following:
`:flat/flattrades set trades
This will save the table trades to the directory flat under the name flattrades.

The following will similarly save the tables quotes as a splayed table.
`:./splay/splayquotes/ set .Q.en[`:./splay;] quotes

If you have any further questions, feel free to ask.

Jonathan