KX Community

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

Home Forums kdb+ qpython to select columns from table

  • qpython to select columns from table

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

    This is about qpython code. Let’s say we have a table named “t” with 2 columns “name” and “iq” in kdb:

     

    from qpython import qconnection, qcollection 
    q = qconnection.QConnection(host='localhost', port=5000): q.open() 
    q("t:flip `name`iq!(`Dent`Beeblebrox`Prefect;98 42 126)")

     

     

    How can we pass the column name and table name through qpython? Thanks.

    pseudo code:

     

    q({select x from y}, "iq", "t")

     

    powerpeanuts replied 8 months, 1 week ago 2 Members · 3 Replies
  • 3 Replies

Log in to reply.