MENU
      getTable

        getTable


        記事の要約

        VPC環境で利用できます。

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

        リクエスト

        リクエスト URL

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

        リクエストパラメータ

        パラメータ名必須有無タイプ制限事項説明
        catalogIdYesStringcatalogの固有 id
        (ref: getCatalogs)
        databaseNameYesStringdatabase名
        tableNameYesStringtable名

        リクエストヘッダ

        共通ガイドを参照

        リクエスト例

        curl -X GET "https://datacatalog.apigw.ntruss.com/api/v1/catalogs/{catalog-id}/databases/{database-name}/tables/{table-name}" \
            -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

        レスポンス

        レスポンスボディ

        項目タイプ説明
        catalogIdIntcatalogの固有 id
        databaseNameStringdatabase名
        tableNameStringtable名
        dataFormatStringtableのデータ形式
        locationStringtableの位置
        descriptionString説明
        createTimeDatetableの作成日時
        updateTimeDatetableの修正日時
        properties.EXTERNALString外部保存の有無
        properties.connectionIdStringスキャンのために利用したコネクションの固有 ID
        properties.connectionNameStringスキャンのために利用したコネクション名
        properties.created_timeStringtableの作成日時
        properties.dataFormatStringデータソースの形式
        properties.dataTypeStringデータソースタイプ
        properties.delimiterStringソースデータが CSVファイルの場合に区分記号
        properties.inputFormatStringFileを Objectで読み取るための Format形式
        properties.isDirectoryStringスキャン対象のディレクトリ有無
        properties.last_modified_timeStringtableの修正日時
        properties.numFilesStringディレクトリの場合、スキャンした総ファイル数
        properties.outputFormatStringObjectを Fileで書き込むための Format形式
        properties.scannerIdStringtableを作成したスキャナー ID
        properties.scannerNameStringtableを作成したスキャナー名
        properties.serializationLibStringSerializer and Deserializer Library
        properties.totalSizeStringディレクトリの場合、スキャンした総データ容量
        properties.transient_lastDdlTimeStringtableの DDLの最終変更日時

        RDBの場合、追加の properties

        項目タイプ説明
        properties.{dbType}CollationStringテーブルの collation
        properties.{dbType}DataSizeStringテーブルに保存されたデータサイズ
        properties.{dbType}IndexSizeStringテーブルのインデックスサイズ
        properties.{dbType}IndexesStringテーブルに設定したインデックス情報
        properties.{dbType}RowsStringテーブルの row数
        properties.{dbType}TableSizeStringテーブル全体のサイズ

        MongoDBの場合、追加の properties

        項目タイプ説明
        properties.mongodbAvgObjSizeStringコレクションの平均オブジェクトサイズ
        properties.mongodbFreeStorageSizeStringコレクションの保存可能サイズ
        properties.mongodbIndexSizeStringコレクションのインデックスサイズ
        properties.mongodbIndexesStringコレクションのインデックス情報
        properties.mongodbRowCountStringコレクションの row数
        properties.mongodbSizeStringコレクションの非圧縮サイズ
        (index sizeを除く)
        properties.mongodbStorageSizeStringコレクションに割り当てられた総ストレージサイズ
        properties.mongodbTotalSizeStringコレクション全体のディスク使用量
        (storage size + index size)

        レスポンス例

        HTTP

        HTTP StatusDescription
        200OK

        JSON

        {
          "catalogId": 2144,
          "databaseName": "default",
          "tableName": "scan_dir",
          "dataFormat": "csv",
          "location": "s3a://bububu/scan-dir/",
          "description": "test table description",
          "createTime": "2023-03-29T14:12:37+0900",
          "updateTime": "2023-06-02T14:01:30+0900",
          "properties": {
            "EXTERNAL": "TRUE",
            "connectionName": "bububu-conn",
            "created_time": "1680066757",
            "dataFormat": "csv",
            "dataType": "file",
            "delimiter": ",",
            "inputFormat": "org.apache.hadoop.mapred.TextInputFormat",
            "isDirectory": "TRUE",
            "last_modified_time": "1685682090",
            "numFiles": "1",
            "outputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
            "scannerId": "283",
            "scannerName": "bububu-scanner",
            "serializationLib": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
            "totalSize": "8402",
            "transient_lastDdlTime": "1680066757"
          }
        }
        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.