getTablePartitions
    • PDF

    getTablePartitions

    • PDF

    記事の要約

    VPC環境で利用できます。

    ユーザー catalogの database/table名で特定の tableの partition key/valueを照会

    リクエスト

    リクエスト URL

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

    リクエストパラメータ

    パラメータ名要否タイプ制約事項説明
    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}/partitions?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}"
    

    レスポンス

    レスポンスボディ

    • partitionList: ユーザー tableの partitionリスト
    項目タイプ説明
    partitionKey.nameStringpartition key名
    partitionValue.valueList[]Stringpartition value名

    レスポンス例

    HTTP

    HTTP StatusDescription
    200OK

    JSON

    {
      "requestId": "d8a6ad30-2d95-4c4d-872a-523cde8356b6",
      "totalCount": 3,
      "partitionList": [
        {
          "partitionKey": {
            "name": "partition_0"
          },
          "partitionValue": {
            "valueList": [
              "test01",
              "test01"
            ]
          }
        },
        {
          "partitionKey": {
            "name": "partition_1"
          },
          "partitionValue": {
            "valueList": [
              "sales",
              "sales"
            ]
          }
        },
        {
          "partitionKey": {
            "name": "partition_2"
          },
          "partitionValue": {
            "valueList": [
              "2021",
              "2022"
            ]
          }
        }
      ]
    }
    

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

    What's Next
    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.