getTableSchemaAndPartitionKeys
    • PDF

    getTableSchemaAndPartitionKeys

    • PDF

    Article summary

    Available in VPC

    Searches for the schema/partition key of a specific table with the database/table name of the user’s catalog.

    Requests

    Request URL

    GET {DATA_CATALOG API_URL}/catalogs/{catalog-id}/databases/{database-name}/tables/{table-name}/schema-and-partition-keys
    

    Request parameters

    Parameter nameRequirement statusTypeRestrictionsDescription
    catalogIdYesStringUnique catalog ID
    (ref: getCatalogs)
    databaseNameYesStringDatabase name
    tableNameYesStringTable name
    pageNoNoint Default of the page number: 1
    pageSizeNointMaximum: 200Default of the result list size: 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/{table-name}/schema-and-partition-keys?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}"
    

    Responses

    Response bodies

    ItemTypeDescription
    schema.nameStringField name
    schema.typeStringData type
    schema.descriptionStringDescription
    schema.integerIdxIntegerOrder of the partition key

    Response examples

    HTTP

    HTTP StatusDescription
    200OK

    JSON

    {
      "pageNo": 1,
      "pageSize": 20,
      "totalCount": 2,
      "requestId": "e69042d1-8b84-4bdc-902f-95b4dd8f0b88",
      "schema": [
        {
          "name": "id",
          "type": "int",
          "description":"string"
        },
        {
          "name": "test",
          "type": "string",
          "description":"string"
        },
        {
          "name": "year",
          "type": "string",
          "integerIdx": 1
        }
      ]
    }
    

    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.