Support Questions

Find answers, ask questions, and share your expertise

How is remarks field populated in phoenix?

Super Guru

When I do a describe in phoenix (!table) a remarks field is displayed. How is this field populated?




I assume that remarks field will be always be empty for your Phoenix tables.

This table description feature you are using is based on JDBC Metadata API.

Phoenix SQL does not support comments on tables, other SQL implementations may support that.

The JDBC Metadata API would return the table comment in the remarks field, (docs)


ResultSet getTables(String catalog,
                  String schemaPattern,
                  String tableNamePattern,
                  String[] types)
                    throws SQLException

Retrieves a description of the tables available in the given catalog. Only table descriptions matching the catalog, schema, table name and type criteria are returned. They are ordered by TABLE_TYPE, TABLE_CAT, TABLE_SCHEM and TABLE_NAME.

Each table description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
  5. REMARKS String => explanatory comment on the table
  6. TYPE_CAT String => the types catalog (may be null)
  7. TYPE_SCHEM String => the types schema (may be null)
  8. TYPE_NAME String => type name (may be null)
  9. SELF_REFERENCING_COL_NAME String => name of the designated "identifier" column of a typed table (may be null)
  10. REF_GENERATION String => specifies how values in SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM", "USER", "DERIVED". (may be null)

See this discussion for further details.

Super Guru

Thanks for your input. I am slightly confused by your response. Is there way to populate the REMARKS metadata via api?