Metadata
Get the metadata from tables
Get tables
POST /v2/ibis/{data_source}/metadata/tables
Path parameters
- data_source: string,
required
. Check out Data source schema in MDL file.
Request body
- connectionInfo: Fill in the information, as in here Connection Info
{
"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
- schema: schema name to build
- 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
- data_source: string,
required
. Check out Data source schema in MDL file.
Request body
- connectionInfo: Fill in the information, as in here Connection Info
{
"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
- constraintName: unique constraint name
{
"constraints": [
{
"constraintName": "composite_pk_y_composite_fk_z",
"constraintType": "FOREIGN KEY",
"constraintTable": "composite_pk",
"constraintColumn": "y",
"constraintedTable": "composite_fk",
"constraintedColumn": "z"
},
...
]
}