Scanning

Scan a database to get a physical data model (PDM)

It scans a database and transforms its metadata to a declarative definition of the physical data model (PDM). The result of the request contains the mentioned physical data model (PDM) of a database within warning, for example, about unsupported columns.

post/api/v1/actions/dataSources/{dataSourceId}/scan

Request

  • Base URL
    https://www.gooddata.ai
  • Auth
    none declared

Path parameters

dataSourceIdstring required

Data source id

Request body

scanTablesboolean required

A flag indicating whether the tables should be scanned.

scanViewsboolean required

A flag indicating whether the views should be scanned.

schematastring[]

What schemata will be scanned.

separatorstring required

A separator between prefixes and the names.

tablePrefixstring

Tables starting with this prefix will be scanned. The prefix is then followed by the value of separator parameter. Given the table prefix is out_table and separator is __, the table with name like out_table__customers will be scanned.

viewPrefixstring

Views starting with this prefix will be scanned. The prefix is then followed by the value of separator parameter. Given the view prefix is out_view and separator is __, the table with name like out_view__us_customers will be scanned.

Example request

{
  "scanTables": true,
  "scanViews": true,
  "schemata": [
    "tpch",
    "demo"
  ],
  "separator": "__",
  "tablePrefix": "out_table",
  "viewPrefix": "out_view"
}

Response

The result of the scan.

Example response

{
  "pdm": {
    "tables": [
      {
        "columns": [
          {
            "dataType": "INT",
            "defaultLabelOf": "gender",
            "description": "Customer unique identifier",
            "name": "customer_id",
            "referencedTableColumn": "customer_id",
            "referencedTableId": "customers"
          }
        ],
        "id": "customers",
        "namePrefix": "out_gooddata",
        "path": [
          "table_schema",
          "table_name"
        ],
        "type": "TABLE"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.