-
Can hdb sym file can be named something other than sym ?
-
Do we used `:newfile? command in the hdb ? Can someone explain its workings ?
-
Ae the following 2 related `:sym? and enum:uniqlist?list
- Yes.
- Yes. You can choose to enumerate each sym column in your hDB with a different list, if that’s the preference. Syntax-wise, one way to achieve it is exactly as what you did: update
:sym1?col1,
:sym2?col2 from t - Somewhat related. The former enumerates against a file of symbol list, while the latter enumerates against an in-memory symbol list.
I’d recommend these links for a more detailed explanation:
1.But what does `:sym? command does by itself without a right hand side ? This is what is worrying me. It is mentioned in the wiki here.
2. what does the highlight mean below. Can other hdbs use the same sym file simultaneously ?
https://code.kx.com/wiki/Reference/QuestionSymbol#.60:sym.3F
`:sym?
using :sym?</tt> tells kdb+ to base sym on the file <tt style='"font-family:monospace,"Courier' new>
:sym - so you can share it and simultaneously update with other tasks. After using the ? operator, the file that is updated will be reloaded into the workspace as the variable based on the filename.
- Without right-hand-side, it’s simply a projection (http://code.kx.com/q/ref/glossary/) of the dyadic operator ?, with the left operand bound to `:sym
- Note that in order for an hDB to operate properly (loadable by \l hdbdir, queryable, etc.), the symbol files (may it be named sym or otherwise), should be located within the root directory of the respective hDB. Therefore, it’s not recommended to share the same sym file for two hDBs (aside from copying the file from one directory to the other).
On Wednesday, March 7, 2018 at 1:08:08 PM UTC+8, Science Student wrote:
1.But what does `:sym? command does by itself without a right hand side ? This is what is worrying me. It is mentioned in the wiki here.
2. what does the highlight mean below. Can other hdbs use the same sym file simultaneously ?https://code.kx.com/wiki/Reference/QuestionSymbol#.60:sym.3F
`:sym?
using
:sym?</tt> tells kdb+ to base sym on the file <tt style='"font-family:monospace,"Courier' new>
:sym - so you can share it and simultaneously update with other tasks. After using the ? operator, the file that is updated will be reloaded into the workspace as the variable based on the filename.
- But the projection cannot work by itself right ? It needs another argument. Is that usually a list which wants to become an enum ?
- I know sharing sym file is not recommended but what do those highlighted lines below mean ?
- Yes. A list, or a table column (essentially just a list).
- You can share the same sym file across all tables within the same hDB. Furthermore, dyadic ? enum is one of the rare operators in q that can be applied simultaneously – so you can actually enumerate against (and update) the same sym file from multiple processes without worrying about concurrent writes.
- http://code.kx.com/q4m3/7\_Transforming\_Data/#75-enumerations
- http://www.timestored.com/kdb-guides/strings-symbols-enumeration
On Wednesday, March 7, 2018 at 1:17:04 PM UTC+8, Science Student wrote:
- But the projection cannot work by itself right ? It needs another argument. Is that usually a list which wants to become an enum ?
- I know sharing sym file is not recommended but what do those highlighted lines below mean ?