KX Community

Find answers, ask questions, and connect with our KX Community around the world.

Home Forums kdb+ Assigning QDictionary in qpython to kdb

  • Assigning QDictionary in qpython to kdb

    Posted by powerpeanuts on July 11, 2022 at 12:00 am

    This might not be directly relevant to kdb/q, as qpython is a third-party library. Let’s say we have a QDictionary qdict in python. How can we send this dictionary to kdb?

    https://qpython.readthedocs.io/en/latest/type-conversion.html#dictionaries

    pseudo code:

     

    qdict = QDictionary(qlist(numpy.array([1, 2], dtype=numpy.int64), qtype=QLONG_LIST), qlist(numpy.array(['abc', 'cdefgh']), qtype = QSYMBOL_LIST))
    with qconnection.QConnection(host = 'localhost', port = 5000) as q:
        q('mydict:', qdict)

     

    powerpeanuts replied 2 months ago 2 Members · 1 Reply
  • 1 Reply

Log in to reply.