loading multiple partitiioned db's

https://learninghub.kx.com/forums/topic/loading-multiple-partitiioned-dbs

Hi,

I'm trying to be able to load multiple partitioned db's.  In KDB, this typically requires you to de-enumerate the symbols before combining data.  Is pykx able to handle this without de-enumartion?  Is that the purpose of the change_dir option in kx.DB() ?


For instance, can I do

db1 = kx.DB(path=/path/to/db1)

db2 = kx.DB(path=/path/to/db2)

kx.q.qsql.select(db1.tbl1) /pykx will use the sym file from db1?


What happening behind the scenes?



  1. No you cannot load 2 HDBs at once in PyKX, the same rules as kdb+ apply
  2. change_dir  is a boolean flag whether to 'cd' (change directory) in to the HDB folder


change_dir=True relies on using .Q.lo which was introduced in kdb+ 4.1

Prior to that the process would always 'cd' in to the HDB folder


https://code.kx.com/q/ref/dotq/#lo-load-without


To enable 4.1 backend (4.0 is default) for PyKX use PYKX_4_1_ENABLED=True environment variable


https://code.kx.com/pykx/3.1/user-guide/configuration.html#options


Docs on DB module in PyKX:


https://code.kx.com/pykx/3.1/user-guide/advanced/database/db_loading.html