Skip to main content

Metadata

Get the metadata from tables

Get tables

POST /v2/ibis/{data_source}/metadata/tables

Path parameters

Request body

{
"connectionInfo": {
"host": "localhost",
"port": "6432",
"user": "postgres",
"database": "postgres",
"password": "postgres"
}
}

Request response

  • tables
    • name: unique table name (might contain schema name, depends on are you listing table across schema or not )
    • columns
      • name: column name in the datasource
      • type: column data type
      • notNull: boolean, nullable or not
      • description: column description (comment), if any
      • properties: column properties, if any
    • description: table description, if any
    • properties
      • schema: schema name to build tableReference
      • catalog: catalog name to build tableReference
      • table: table name to build tableReference
    • primaryKey: the column name which is bind with primary constraint
{ 
"tables": [
{
"name": "public.nation",
"columns": [
{
"name": "n_nationkey",
"type": "INTEGER",
"notNull": true,
"description": "",
"properties": {}
}
],
"description": "",
"properties": {
"schema": "public",
"catalog": "postgres",
"table": "nation"
},
"primaryKey": ""
},
...
]
}

Get constraints

POST /v2/ibis/{data_source}/metadata/constraints

Path parameters

Request body

{
"connectionInfo": {
"host": "localhost",
"port": "6432",
"user": "postgres",
"database": "postgres",
"password": "postgres"
}
}

Request response

  • constraints
    • constraintName: unique constraint name ({constraint_table}_{constraint_column}_{constrainted_table}_{constrainted_column})
    • constraintType: “FOREIGN KEY”
    • constraintTable
    • constraintColumn
    • constraintedTable
    • constraintedColumn
{ 
"constraints": [
{
"constraintName": "composite_pk_y_composite_fk_z",
"constraintType": "FOREIGN KEY",
"constraintTable": "composite_pk",
"constraintColumn": "y",
"constraintedTable": "composite_fk",
"constraintedColumn": "z"
},
...
]
}