MENU
      getTable

        getTable


        Article summary

        Available in VPC

        View 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}
        HTTP

        Request parameters

        Parameter nameRequiredTypeService limitsDescription
        catalogIdYesStringUnique catalog ID
        (ref: getCatalogs)
        databaseNameYesStringDatabase name
        tableNameYesStringTable name

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

        ItemTypeDescription
        catalogIdIntUnique catalog ID
        databaseNameStringDatabase name
        tableNameStringTable name
        dataFormatStringData format of table
        locationStringPosition of table
        descriptionStringDescription
        createTimeDateTable creation date and time
        updateTimeDateTable editing date and time
        properties.EXTERNALStringExternal storage status
        properties.connectionIdStringUnique ID of the connection used for scanning
        properties.connectionNameStringConnection name used for scanning
        properties.created_timeStringTable creation date and time
        properties.dataFormatStringFormat of data source
        properties.dataTypeStringType of data source
        properties.delimiterStringDelimiter if the source data is a CSV file
        properties.inputFormatStringFormat for reading file into Object
        properties.isDirectoryStringInformation on whether the scan target is a directory
        properties.last_modified_timeStringTable modification date and time
        properties.numFilesStringTotal number of files scanned when the scan target is a directory
        properties.outputFormatStringFormat for writing file into Object
        properties.scannerIdStringID of the scanner for which a table is created
        properties.scannerNameStringName of the scanner for which a table is created
        properties.serializationLibStringSerializer and Deserializer Library
        properties.totalSizeStringTotal amount of data scanned when the scan target is a directory
        properties.transient_lastDdlTimeStringDate and time of the last change in the DDL of table

        Additional properties for RDB

        ItemTypeDescription
        properties.{dbType}CollationStringTable collation
        properties.{dbType}DataSizeStringData size saved in table
        properties.{dbType}IndexSizeStringIndex size of table
        properties.{dbType}IndexesStringIndex information set in table
        properties.{dbType}RowsStringNumber of row in table
        properties.{dbType}TableSizeStringTotal table size

        Additional properties for MongoDB

        ItemTypeDescription
        properties.mongodbAvgObjSizeStringAverage object size of collection
        properties.mongodbFreeStorageSizeStringAvailable save size of collection
        properties.mongodbIndexSizeStringIndex size of collection
        properties.mongodbIndexesStringIndex information of collection
        properties.mongodbRowCountStringNumber of row in collection
        properties.mongodbSizeStringUncompressed size of collection
        (exclude index size)
        properties.mongodbStorageSizeStringTotal save size assigned to collection
        properties.mongodbTotalSizeStringTotal disk usage of collection
        (storage size + index size)

        Response examples

        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

        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.