MENU
      getTablesByDatabase

        getTablesByDatabase


        Article summary

        Available in VPC

        Searches for all tables in a specific database with the database name of the user's catalog.

        Requests

        Request URL

        GET {DATA_CATALOG API_URL}/catalogs/{catalog-id}/databases/{database-name}/tables
        HTTP

        Request parameters

        Parameter nameRequirement statusTypeRestrictionsDescription
        catalogIdYesStringUnique catalog ID
        (ref: getCatalogs)
        databaseNameYesStringDatabase name
        pageNoNointPage number
        Default: 1
        pageSizeNointMaximum: 200size of result list
        Default: 20

        Request header

        See common guide.

        Request examples

        curl -X GET "https://datacatalog.apigw.ntruss.com/api/v1/catalogs/{catalog-id}/databases/{database-name}/tables?pageNo=1&pageSize=20" \
            -H "x-ncp-apigw-timestamp: {x-ncp-apigw-timestamp}" \
            -H "x-ncp-iam-access-key: {x-ncp-iam-access-key}"  \
            -H "x-ncp-apigw-signature-v2: {x-ncp-apigw-signature-v2}"
        Bash

        Responses

        Response bodies

        • tableResponseList: list of tables in the user’s catalog
        ItemTypeDescription
        catalogIdIntUnique catalog ID
        tableNameStringTable name
        databaseNameStringDatabase name
        scannerIdIntUnique scanner ID
        locationStringPosition of table
        dataFormatStringData format of table
        versionIntVersion of table
        createTimeDateTable creation date and time
        updateTimeDateTable modification date and time

        Response examples

        HTTP

        HTTP StatusDescription
        200OK

        JSON

        {
          "pageNo": 1,
          "pageSize": 20,
          "totalCount": 1,
          "requestId": "4899965b-6454-40e3-983f-38a58406fed7",
          "tableResponseList": [
            {
              "catalogId": 2144,
              "tableName": "scan_dir",
              "databaseName": "default",
              "scannerId": 0,
              "location": "s3a://bububu/scan-dir/",
              "dataFormat": "csv",
              "version": 0,
              "createTime": "2023-03-29T14:12:37+0900",
              "updateTime": "2023-06-02T14:01:30+0900"
            }
          ]
        }
        JSON

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.