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로 읽기 위한 Fotmat 형식
        properties.isDirectoryString스캔 대상의 디렉터리 여부
        properties.last_modified_timeStringtable의 수정 일시
        properties.numFilesString디렉터리인 경우 스캔한 총 파일 수
        properties.outputFormatStringObject를 File로 쓰기 위한 Fotmat 형식
        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.