MENU
      getTableSchemaAndPartitionKeys

        getTableSchemaAndPartitionKeys


        記事の要約

        VPC環境で利用できます。

        ユーザー catalogの database/table名で特定の tableの schema/partition keyを照会します。

        リクエスト

        リクエスト URL

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

        リクエストパラメータ

        パラメータ名要否タイプ制約事項説明
        catalogIdYesStringcatalogの固有 id
        (ref: getCatalogs)
        databaseNameYesStringdatabase名
        tableNameYesStringtable名
        pageNoNoint ページ番号デフォルト値: 1
        pageSizeNoint最大値: 200結果リストサイズのデフォルト値: 20

        リクエストヘッダ

        共通ガイド参照

        リクエスト例

        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}"
        Bash

        レスポンス

        レスポンスボディ

        項目タイプ説明
        schema.nameStringフィールド名
        schema.typeStringデータタイプ
        schema.descriptionString説明
        schema.integerIdxIntegerpartition keyの順序

        レスポンス例

        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
            }
          ]
        }
        JSON

        この記事は役に立ちましたか?

        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.