getTableSchema
    • PDF

    getTableSchema

    • PDF

    기사 요약

    VPC 환경에서 이용 가능합니다.

    사용자 catalog의 database/table 이름으로 특정 table의 schema를 조회합니다.

    요청

    요청 URL

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

    요청 파라미터

    파라미터명필수 여부타입제약 사항설명
    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?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}"
    

    응답

    응답 바디

    항목타입설명
    schema.nameString필드 이름
    schema.typeString데이터 유형
    schema.descriptionString설명

    응답 예시

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

    이 문서가 도움이 되었습니까?

    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.