Search code examples
pythonsqlapacheignite

DESCRIBE TABLE Equivalent for Apache Ignite


I am looking to get the column names and the data types for my Apache Ignite tables. Is there a SQL query that can be used to accomplish this? Maybe an equivalent to the DESCRIBE TABLE command?

If this is not possible using SQL, can it be done using the Python driver for Apache Ignite: pyignite?


Solution

  • It is possible to get the columns and data types of tables in Apache Ignite by using the SYS.TABLE_COLUMNS system table.

    The query is as follows,

    SELECT COLUMN_NAME, TYPE
    FROM SYS.TABLE_COLUMNS
    WHERE TABLE_NAME = <table_name>
    

    Note: The data types returned are Java object types.