KX Community

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

Home Forums kdb+ Strange data type prevents table operation on what looks like a table Re: Strange data type prevents table operation on what looks like a table

  • gyorokpeter-kx

    Member
    February 15, 2024 at 12:00 am

    q collapses dictionaries with matching keys into a table. However this doesn’t happen if the list in question is a table column.

    The pretty printing logic still does the conversion as part of printing the value, but doesn’t change the underlying type, which means functions that expect a “real” table will fail.

    You can force the collapsing by remaking the list using an each:

    q)type(::)each exec col1 from tab 98h q)cols(::)each exec col1 from tab `col11`col12