# splayed table string datatype

**URL:** <https://forum.kx.com/t/splayed-table-string-datatype/9145>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [October 9, 2014, 1:00pm UTC](https://forum.kx.com/t/splayed-table-string-datatype/9145 "2014-10-09T13:00:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas\_agarwal1](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@vikas\_agarwal1](https://forum.kx.com/u/vikas_agarwal1)\
**Post date:** [October 9, 2014, 1:00pm UTC](https://forum.kx.com/t/splayed-table-string-datatype/9145/1 "2014-10-09T13:00:00Z")

</div>

Hi,

I am splaying a file(5gb, 10M) that contains 117 column. In which 50 columns are Varchar. If i take all 50 columns as symbol then q(32 bit) restarts after memory full.

What will be right way to load data as string.&nbsp;

fun:{ddd:.Q.en[`:allsyms;]flip colnames!(“CCCCCCCCCCCICCCFFFCCCCCCCCCCCCCFCCICCFCCIFCIIICCCCCCCCCCCCCCIIIICCCCFIFIFFCFFFFCFFFFCCFIFIFCCICFCCIFCCCCCCCFCCCIFFFFC”;“|”)0:x &nbsp; &nbsp;

&nbsp; &nbsp; ;0N!ddd;

&nbsp; &nbsp; `:all/vrsData/ upsert ddd}

.Q.fsn[fun;;199999999]`:data/sample.txt

If i use C(type) then it is just a character and also give different meaning.

Please let me know to load the data with string types.

---

<div class="post-metadata">

**Author:** ![charlie1](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@charlie1](https://forum.kx.com/u/charlie1)\
**Post date:** [October 9, 2014, 1:04pm UTC](https://forum.kx.com/t/splayed-table-string-datatype/9145/2 "2014-10-09T13:04:00Z")

</div>

q)(“DT\*\*CS”;“,”)0:“2001.01.01,10:30:00,hello,world,z,test”

2001.01.01

10:30:00.000

“hello”

“world”

“z”

`test

---

<div class="post-metadata">

**Author:** ![vikas\_agarwal1](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@vikas\_agarwal1](https://forum.kx.com/u/vikas_agarwal1)\
**Post date:** [October 9, 2014, 1:33pm UTC](https://forum.kx.com/t/splayed-table-string-datatype/9145/3 "2014-10-09T13:33:00Z")

</div>

Thanks Charles.

---

<div class="post-metadata">

**Author:** ![vikas\_agarwal1](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@vikas\_agarwal1](https://forum.kx.com/u/vikas_agarwal1)\
**Post date:** [October 10, 2014, 7:36am UTC](https://forum.kx.com/t/splayed-table-string-datatype/9145/4 "2014-10-10T07:36:00Z")

</div>

Hi,

Can Splayed(Partition/Segmented) tables and logging be done together.

I ran q with following arguments:

w32\q logtest/yes -l -p 2029

and in yes.q i have following entry

\l /db

that inturn load serailized files and q files in the c:/db directory

But after doing this, if i try something

aa:22

it does no go into logtest/yes.log

I have another question on using a different drive (like d:).

\l /db (q understands that db is in c drive if i have forward slash before)

\l db(db is inside QHOME)

how to say load something from d:/xyz

---

<div class="post-metadata">

**Author:** ![vikas\_agarwal1](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@vikas\_agarwal1](https://forum.kx.com/u/vikas_agarwal1)\
**Post date:** [October 10, 2014, 4:10pm UTC](https://forum.kx.com/t/splayed-table-string-datatype/9145/5 "2014-10-10T16:10:00Z")

</div>

I think for other drive we can use following:

fh1:(hsym `$“e:/db/2009.01.01/t/”)

fh2:(hsym `$“e:/db/2009.01.02/t/”)

fh1 set

&nbsp; &nbsp; &nbsp; &nbsp; ( ti:09:30:00 09:31:00;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sym:`:/db/sym?`ibm`msft; p:101 33f)

fh2 set

&nbsp; &nbsp; &nbsp; &nbsp; ( ti:09:30:00 09:31:00;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sym:`:/db/sym?`ibm`msft; p:101.5 33.5)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

\l e:\db
