# Capstone Project Partitioned table /dbs

**URL:** <https://forum.kx.com/t/capstone-project-partitioned-table-dbs/13272>\
**Category:** Academy Support\
**Tags:** imported\
**Created:** [December 21, 2022, 12:00am UTC](https://forum.kx.com/t/capstone-project-partitioned-table-dbs/13272 "2022-12-21T00:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![philsing24](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@philsing24](https://forum.kx.com/u/philsing24)\
**Post date:** [December 21, 2022, 12:00am UTC](https://forum.kx.com/t/capstone-project-partitioned-table-dbs/13272/1 "2022-12-21T00:00:00Z")

</div>

[https://learninghub.kx.com/forums/topic/capstone-project-partitioned-table-dbs](https://learninghub.kx.com/forums/topic/capstone-project-partitioned-table-dbs)

Hi,

ls /dbs // I get the 4 partitioned values  
"2020.08.03"  
"2020.08.04"  
"2020.08.05"  
"2020.08.06"  
"sym"

I don't understand what sym represents.  
when I type cols trade, I don't see the column sym but I can still run the following statement  
select sym from trade where date=2020.08.05

what's the difference between option\_id and sym? I see only two 2 differences. Sym contains two more rows containing B and S ?!

## sym

**B**   
FB20200720C230  
FB20200720C240

....

**S**

&nbsp;

---

<div class="post-metadata">

**Author:** ![rocuinneagain](https://sea2.discourse-cdn.com/flex002/user_avatar/forum.kx.com/rocuinneagain/32/287_2.png) [@rocuinneagain](https://forum.kx.com/u/rocuinneagain)\
**Post date:** [December 21, 2022, 12:00am UTC](https://forum.kx.com/t/capstone-project-partitioned-table-dbs/13272/2 "2022-12-21T00:00:00Z")

</div>

The sym file contains enumerated symbols for an symbol column in any table.

&nbsp;

The reason you can select it is that if q fails to find a column of that name it will try to use a global variable , which sym will be.

&nbsp;

```
q)`:tab/ set .Q.en[`:.] ([] a:1 2 3;b:`a`b`c) 
`:tab/ 
q)tab:get 
`:tab/ 
q)tab 
a b 
--- 
1 a 
2 b 
3 c 
q)select sym from tab 
sym 
--- 
a 
b 
c 
q)sym //sym is in memory 
`a`b`c 2
q)nonsense:`one`two`three 
q)select nonsense from tab //nonsense is not a column but a global variable 
nonsense 
-------- 
one 
two 
three 
q)delete sym from `. /delete sym from memory 
`. 
q)tab / now any sym columns show indexes as they cannot resolve their text 
a b 
--- 
1 0 
2 1 
3 2
```

&nbsp;

Review some documentation on enumeration and on disk data:

- [https://code.kx.com/q/basics/enumerations/](https://code.kx.com/q/basics/enumerations/")
- [https://code.kx.com/q4m3/14\_Introduction\_to\_Kdb+/#1428-working-with-sym-files](https://code.kx.com/q4m3/14_Introduction_to_Kdb+/#1428-working-with-sym-files")

&nbsp;
