JSONColumnsWithMetadata 형식

JSONColumnsWithMetadata 형식

JSONColumnsWithMetadata 형식은 JSONColumns 형식과 달리 메타데이터와 통계(JSON 형식과 유사)도 포함해요. 모든 데이터를 메모리에 버퍼링한 뒤 단일 블록으로 출력하므로 메모리 소비가 높아질 수 있습니다.

출처: 문서

본문

Input Output Alias

설명 (Description)

JSONColumns 형식과 달리 이 형식은 일부 메타데이터와 통계(JSON 형식과 유사)도 포함합니다. JSONColumnsWithMetadata 형식은 모든 데이터를 메모리에 버퍼링한 뒤 단일 블록으로 출력하므로 메모리 소비가 높아질 수 있습니다.

사용 예시 (Example usage)

예시:

{
        "meta":
        [
                {
                        "name": "num",
                        "type": "Int32"
                },
                {
                        "name": "str",
                        "type": "String"
                },

                {
                        "name": "arr",
                        "type": "Array(UInt8)"
                }
        ],

        "data":
        {
                "num": [42, 43, 44],
                "str": ["hello", "hello", "hello"],
                "arr": [[0,1], [0,1,2], [0,1,2,3]]
        },

        "rows": 3,

        "rows_before_limit_at_least": 3,

        "statistics":
        {
                "elapsed": 0.000272376,
                "rows_read": 3,
                "bytes_read": 24
        }
}

JSONColumnsWithMetadata 입력 형식의 경우 input_format_json_validate_types_from_metadata를 1로 설정하면 입력 데이터의 메타데이터 타입이 테이블의 해당 컬럼 타입과 비교됩니다.

형식 설정 (Format settings)

더 알아보기 (Learn more)