> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ClickHouse에서 지원하는 입력 및 출력 데이터 포맷 개요

# 입력 및 출력 데이터 포맷

export const CloudNotSupportedBadge = () => {
  return <div className="cloudNotSupportedBadge">
            <div className="cloudNotSupportedIcon">
            <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path strokeWidth="1.5" d="M6.33366 12.6666L12.3739 12.6667C13.6593 12.6667 14.7073 11.6187 14.7073 10.3334C14.7073 9.04804 13.6593 8.00003 12.3739 8.00003C12.3739 8.00003 12.3337 7.66659 12.0003 7.33325M10.667 5.33322C8.00033 2.33325 4.45395 4.78537 4.14195 6.68203C2.55728 6.7627 1.29395 8.06203 1.29395 9.6667C1.29395 11.3234 2.66699 12.6666 4.00033 12.6666" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
                <path strokeWidth="1.5" d="M2.66699 14L12.0003 4.66663" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
            </svg>

        </div>
            ClickHouse Cloud에서 지원되지 않음
        </div>;
};

ClickHouse는 널리 알려진 대부분의 텍스트 및 바이너리 데이터 포맷을 지원합니다. 이를 통해 거의 모든
데이터 파이프라인에 손쉽게 통합하여 ClickHouse의 장점을 활용할 수 있습니다.

<div id="input-formats">
  ## 입력 형식
</div>

입력 형식은 다음 용도로 사용됩니다.

* `INSERT` SQL 문에 제공된 데이터 파싱
* `File`, `URL`, `HDFS`와 같은 파일 기반 테이블(file-backed tables)에서 `SELECT` 쿼리 수행
* 딕셔너리 읽기

ClickHouse에서 데이터를 효율적으로 수집하려면 적절한 입력 형식을 선택하는 것이 매우 중요합니다. 지원되는 포맷이 70개가 넘기 때문에,
가장 성능이 뛰어난 옵션을 선택하면 삽입 속도, CPU 및 메모리 사용량, 전반적인 시스템
효율성에 큰 차이를 만들 수 있습니다. 이러한 선택에 도움을 드리기 위해 포맷별 수집 성능을 벤치마크했으며, 그 결과 다음과 같은 핵심 사항을 확인했습니다.

* **[Native](/docs/ko/reference/formats/Native) 포맷은 가장 효율적인 입력 형식입니다**. 가장 뛰어난 압축률, 가장 낮은
  리소스 사용량, 최소한의 서버 측 처리 오버헤드를 제공합니다.
* **압축은 필수입니다** - LZ4는 CPU 비용을 거의 늘리지 않으면서 데이터 크기를 줄여 주고, ZSTD는 더 높은 압축률을 제공하는 대신
  CPU 사용량이 더 필요합니다.
* **사전 정렬의 영향은 중간 정도입니다**. ClickHouse가 이미 효율적으로 정렬하기 때문입니다.
* **배칭은 효율성을 크게 높입니다** - 배치가 클수록 삽입 오버헤드가 줄고 처리량이 향상됩니다.

결과와 모범 사례를 자세히 살펴보려면
전체 [벤치마크 분석](https://www.clickhouse.com/blog/clickhouse-input-format-matchup-which-is-fastest-most-efficient)을 읽어보십시오.
전체 테스트 결과는 [FastFormats](https://fastformats.clickhouse.com/) 온라인 대시보드에서 확인하십시오.

<div id="output-formats">
  ## 출력 형식
</div>

출력에 지원되는 포맷은 다음 용도로 사용됩니다:

* `SELECT` 쿼리 결과를 정렬
* 파일 기반 테이블에 `INSERT` 작업 수행

<div id="formats-overview">
  ## 포맷 개요
</div>

지원되는 포맷은 다음과 같습니다:

| 포맷                                                                                                                                 | 입력 | 출력 |
| ---------------------------------------------------------------------------------------------------------------------------------- | -- | -- |
| [TabSeparated](/docs/ko/reference/formats/TabSeparated/TabSeparated)                                                                    | ✔  | ✔  |
| [TabSeparatedRaw](/docs/ko/reference/formats/TabSeparated/TabSeparatedRaw)                                                              | ✔  | ✔  |
| [TabSeparatedWithNames](/docs/ko/reference/formats/TabSeparated/TabSeparatedWithNames)                                                  | ✔  | ✔  |
| [TabSeparatedWithNamesAndTypes](/docs/ko/reference/formats/TabSeparated/TabSeparatedWithNamesAndTypes)                                  | ✔  | ✔  |
| [TabSeparatedRawWithNames](/docs/ko/reference/formats/TabSeparated/TabSeparatedRawWithNames)                                            | ✔  | ✔  |
| [TabSeparatedRawWithNamesAndTypes](/docs/ko/reference/formats/TabSeparated/TabSeparatedRawWithNamesAndTypes)                            | ✔  | ✔  |
| [Template](/docs/ko/reference/formats/Template/Template)                                                                                | ✔  | ✔  |
| [TemplateIgnoreSpaces](/docs/ko/reference/formats/Template/TemplateIgnoreSpaces)                                                        | ✔  | ✗  |
| [CSV](/docs/ko/reference/formats/CSV/CSV)                                                                                               | ✔  | ✔  |
| [CSVWithNames](/docs/ko/reference/formats/CSV/CSVWithNames)                                                                             | ✔  | ✔  |
| [CSVWithNamesAndTypes](/docs/ko/reference/formats/CSV/CSVWithNamesAndTypes)                                                             | ✔  | ✔  |
| [CustomSeparated](/docs/ko/reference/formats/CustomSeparated/CustomSeparated)                                                           | ✔  | ✔  |
| [CustomSeparatedIgnoreSpaces](/docs/ko/reference/formats/CustomSeparated/CustomSeparatedIgnoreSpaces)                                   | ✔  | ✗  |
| [CustomSeparatedIgnoreSpacesWithNames](/docs/ko/reference/formats/CustomSeparated/CustomSeparatedIgnoreSpacesWithNames)                 | ✔  | ✗  |
| [CustomSeparatedIgnoreSpacesWithNamesAndTypes](/docs/ko/reference/formats/CustomSeparated/CustomSeparatedIgnoreSpacesWithNamesAndTypes) | ✔  | ✗  |
| [CustomSeparatedWithNames](/docs/ko/reference/formats/CustomSeparated/CustomSeparatedWithNames)                                         | ✔  | ✔  |
| [CustomSeparatedWithNamesAndTypes](/docs/ko/reference/formats/CustomSeparated/CustomSeparatedWithNamesAndTypes)                         | ✔  | ✔  |
| [HiveText](/docs/ko/reference/formats/HiveText)                                                                                         | ✔  | ✗  |
| [SQLInsert](/docs/ko/reference/formats/SQLInsert)                                                                                       | ✗  | ✔  |
| [Values](/docs/ko/reference/formats/Values)                                                                                             | ✔  | ✔  |
| [Vertical](/docs/ko/reference/formats/Vertical)                                                                                         | ✗  | ✔  |
| [JSON](/docs/ko/reference/formats/JSON/JSON)                                                                                            | ✔  | ✔  |
| [JSONAsString](/docs/ko/reference/formats/JSON/JSONAsString)                                                                            | ✔  | ✗  |
| [JSONAsObject](/docs/ko/reference/formats/JSON/JSONAsObject)                                                                            | ✔  | ✗  |
| [JSONStrings](/docs/ko/reference/formats/JSON/JSONStrings)                                                                              | ✗  | ✔  |
| [JSONColumns](/docs/ko/reference/formats/JSON/JSONColumns)                                                                              | ✔  | ✔  |
| [JSONColumnsWithMetadata](/docs/ko/reference/formats/JSON/JSONColumnsWithMetadata)                                                      | ✔  | ✔  |
| [JSONCompact](/docs/ko/reference/formats/JSON/JSONCompact)                                                                              | ✔  | ✔  |
| [JSONCompactStrings](/docs/ko/reference/formats/JSON/JSONCompactStrings)                                                                | ✗  | ✔  |
| [JSONCompactColumns](/docs/ko/reference/formats/JSON/JSONCompactColumns)                                                                | ✔  | ✔  |
| [JSONEachRow](/docs/ko/reference/formats/JSON/JSONEachRow)                                                                              | ✔  | ✔  |
| [JSONLines](/docs/ko/reference/formats/JSON/JSONLines)                                                                                  | ✔  | ✔  |
| [PrettyJSONEachRow](/docs/ko/reference/formats/JSON/PrettyJSONEachRow)                                                                  | ✗  | ✔  |
| [JSONEachRowWithProgress](/docs/ko/reference/formats/JSON/JSONEachRowWithProgress)                                                      | ✗  | ✔  |
| [JSONStringsEachRow](/docs/ko/reference/formats/JSON/JSONStringsEachRow)                                                                | ✔  | ✔  |
| [JSONStringsEachRowWithProgress](/docs/ko/reference/formats/JSON/JSONStringsEachRowWithProgress)                                        | ✗  | ✔  |
| [JSONCompactEachRow](/docs/ko/reference/formats/JSON/JSONCompactEachRow)                                                                | ✔  | ✔  |
| [JSONCompactEachRowWithNames](/docs/ko/reference/formats/JSON/JSONCompactEachRowWithNames)                                              | ✔  | ✔  |
| [JSONCompactEachRowWithNamesAndTypes](/docs/ko/reference/formats/JSON/JSONCompactEachRowWithNamesAndTypes)                              | ✔  | ✔  |
| [JSONCompactEachRowWithProgress](/docs/ko/reference/formats/JSON/JSONCompactEachRowWithProgress)                                        | ✗  | ✔  |
| [JSONCompactStringsEachRow](/docs/ko/reference/formats/JSON/JSONCompactStringsEachRow)                                                  | ✔  | ✔  |
| [JSONCompactStringsEachRowWithNames](/docs/ko/reference/formats/JSON/JSONCompactStringsEachRowWithNames)                                | ✔  | ✔  |
| [JSONCompactStringsEachRowWithNamesAndTypes](/docs/ko/reference/formats/JSON/JSONCompactStringsEachRowWithNamesAndTypes)                | ✔  | ✔  |
| [JSONCompactStringsEachRowWithProgress](/docs/ko/reference/formats/JSON/JSONCompactStringsEachRowWithProgress)                          | ✗  | ✔  |
| [JSONObjectEachRow](/docs/ko/reference/formats/JSON/JSONObjectEachRow)                                                                  | ✔  | ✔  |
| [BSONEachRow](/docs/ko/reference/formats/BSONEachRow)                                                                                   | ✔  | ✔  |
| [TSKV](/docs/ko/reference/formats/TabSeparated/TSKV)                                                                                    | ✔  | ✔  |
| [Pretty](/docs/ko/reference/formats/Pretty/Pretty)                                                                                      | ✗  | ✔  |
| [PrettyNoEscapes](/docs/ko/reference/formats/Pretty/PrettyNoEscapes)                                                                    | ✗  | ✔  |
| [PrettyMonoBlock](/docs/ko/reference/formats/Pretty/PrettyMonoBlock)                                                                    | ✗  | ✔  |
| [PrettyNoEscapesMonoBlock](/docs/ko/reference/formats/Pretty/PrettyNoEscapesMonoBlock)                                                  | ✗  | ✔  |
| [PrettyCompact](/docs/ko/reference/formats/Pretty/PrettyCompact)                                                                        | ✗  | ✔  |
| [PrettyCompactNoEscapes](/docs/ko/reference/formats/Pretty/PrettyCompactNoEscapes)                                                      | ✗  | ✔  |
| [PrettyCompactMonoBlock](/docs/ko/reference/formats/Pretty/PrettyCompactMonoBlock)                                                      | ✗  | ✔  |
| [PrettyCompactNoEscapesMonoBlock](/docs/ko/reference/formats/Pretty/PrettyCompactNoEscapesMonoBlock)                                    | ✗  | ✔  |
| [PrettySpace](/docs/ko/reference/formats/Pretty/PrettySpace)                                                                            | ✗  | ✔  |
| [PrettySpaceNoEscapes](/docs/ko/reference/formats/Pretty/PrettySpaceNoEscapes)                                                          | ✗  | ✔  |
| [PrettySpaceMonoBlock](/docs/ko/reference/formats/Pretty/PrettySpaceMonoBlock)                                                          | ✗  | ✔  |
| [PrettySpaceNoEscapesMonoBlock](/docs/ko/reference/formats/Pretty/PrettySpaceNoEscapesMonoBlock)                                        | ✗  | ✔  |
| [Prometheus](/docs/ko/reference/formats/Prometheus)                                                                                     | ✗  | ✔  |
| [Protobuf](/docs/ko/reference/formats/Protobuf/Protobuf)                                                                                | ✔  | ✔  |
| [ProtobufSingle](/docs/ko/reference/formats/Protobuf/ProtobufSingle)                                                                    | ✔  | ✔  |
| [ProtobufList](/docs/ko/reference/formats/Protobuf/ProtobufList)                                                                        | ✔  | ✔  |
| [Avro](/docs/ko/reference/formats/Avro/Avro)                                                                                            | ✔  | ✔  |
| [AvroConfluent](/docs/ko/reference/formats/Avro/AvroConfluent)                                                                          | ✔  | ✔  |
| [Parquet](/docs/ko/reference/formats/Parquet/Parquet)                                                                                   | ✔  | ✔  |
| [ParquetMetadata](/docs/ko/reference/formats/Parquet/ParquetMetadata)                                                                   | ✔  | ✗  |
| [Arrow](/docs/ko/reference/formats/Arrow/Arrow)                                                                                         | ✔  | ✔  |
| [ArrowStream](/docs/ko/reference/formats/Arrow/ArrowStream)                                                                             | ✔  | ✔  |
| [ORC](/docs/ko/reference/formats/ORC)                                                                                                   | ✔  | ✔  |
| [One](/docs/ko/reference/formats/One)                                                                                                   | ✔  | ✗  |
| [Npy](/docs/ko/reference/formats/Npy)                                                                                                   | ✔  | ✔  |
| [RowBinary](/docs/ko/reference/formats/RowBinary/RowBinary)                                                                             | ✔  | ✔  |
| [RowBinaryWithNames](/docs/ko/reference/formats/RowBinary/RowBinaryWithNames)                                                           | ✔  | ✔  |
| [RowBinaryWithNamesAndTypes](/docs/ko/reference/formats/RowBinary/RowBinaryWithNamesAndTypes)                                           | ✔  | ✔  |
| [RowBinaryWithDefaults](/docs/ko/reference/formats/RowBinary/RowBinaryWithDefaults)                                                     | ✔  | ✗  |
| [RowBinaryWithNamesAndTypesAndDefaults](/docs/ko/reference/formats/RowBinary/RowBinaryWithNamesAndTypesAndDefaults)                     | ✔  | ✗  |
| [Native](/docs/ko/reference/formats/Native)                                                                                             | ✔  | ✔  |
| [Buffers](/docs/ko/reference/formats/Buffers)                                                                                           | ✔  | ✔  |
| [Null](/docs/ko/reference/formats/Null)                                                                                                 | ✗  | ✔  |
| [Hash](/docs/ko/reference/formats/Hash)                                                                                                 | ✗  | ✔  |
| [XML](/docs/ko/reference/formats/XML)                                                                                                   | ✗  | ✔  |
| [CapnProto](/docs/ko/reference/formats/CapnProto)                                                                                       | ✔  | ✔  |
| [LineAsString](/docs/ko/reference/formats/LineAsString/LineAsString)                                                                    | ✔  | ✔  |
| [LineAsStringWithNames](/docs/ko/reference/formats/LineAsString/LineAsStringWithNames)                                                  | ✗  | ✔  |
| [LineAsStringWithNamesAndTypes](/docs/ko/reference/formats/LineAsString/LineAsStringWithNamesAndTypes)                                  | ✗  | ✔  |
| [Regexp](/docs/ko/reference/formats/Regexp)                                                                                             | ✔  | ✗  |
| [RawBLOB](/docs/ko/reference/formats/RawBLOB)                                                                                           | ✔  | ✔  |
| [MsgPack](/docs/ko/reference/formats/MsgPack)                                                                                           | ✔  | ✔  |
| [MySQLDump](/docs/ko/reference/formats/MySQLDump)                                                                                       | ✔  | ✗  |
| [MySQLWire](/docs/ko/reference/formats/MySQLWire)                                                                                       | ✗  | ✔  |
| [PostgreSQLWire](/docs/ko/reference/formats/PostgreSQLWire)                                                                             | ✗  | ✔  |
| [ODBCDriver2](/docs/ko/reference/formats/ODBCDriver2)                                                                                   | ✗  | ✔  |
| [GeoJSON](/docs/ko/reference/formats/GeoJSON)                                                                                           | ✔  | ✔  |
| [DWARF](/docs/ko/reference/formats/DWARF)                                                                                               | ✔  | ✗  |
| [Markdown](/docs/ko/reference/formats/Markdown)                                                                                         | ✗  | ✔  |
| [Form](/docs/ko/reference/formats/Form)                                                                                                 | ✔  | ✗  |

일부 포맷 처리 매개변수는 ClickHouse 설정을 통해 제어할 수 있습니다. 자세한 내용은 [설정](/docs/ko/reference/settings/formats) 섹션을 참조하십시오.

추가 JSON 전용 설정은 [JSON 포맷 설정](/docs/ko/reference/formats/JSON/format-settings) 페이지에 설명되어 있습니다.

<div id="formatschema">
  ## 포맷 스키마
</div>

포맷 스키마를 포함하는 파일 이름은 `format_schema` 설정으로 지정합니다.
`Cap'n Proto`와 `Protobuf` 포맷 중 하나를 사용할 때는 이 설정을 반드시 지정해야 합니다.
포맷 스키마는 파일 이름과 그 파일에 있는 메시지 유형 이름을 콜론으로 구분해 결합한 형태이며,
예를 들어 `schemafile.proto:MessageType`와 같습니다.
파일에 해당 포맷의 표준 확장자(예: `Protobuf`의 `.proto`)가 있으면
이를 생략할 수 있으며, 이 경우 포맷 스키마는 `schemafile:MessageType` 형태가 됩니다.

대화형 모드에서 [client](/docs/ko/concepts/features/interfaces/client)를 통해 데이터를 입력하거나 출력하는 경우, 포맷 스키마에 지정된 파일 이름에는
절대 경로나 클라이언트의 현재 디렉터리를 기준으로 한 상대 경로를 사용할 수 있습니다.
[batch mode](/docs/ko/concepts/features/interfaces/client#batch-mode)에서 client를 사용하는 경우에는 보안상의 이유로 스키마 경로가 상대 경로여야 합니다.

[HTTP 인터페이스](/docs/ko/concepts/features/interfaces/http)를 통해 데이터를 입력하거나 출력하는 경우, 포맷 스키마에 지정된 파일 이름은
서버 구성의 [format\_schema\_path](/docs/ko/reference/settings/server-settings/settings#format_schema_path)에서 지정한 디렉터리에
있어야 합니다.

<div id="skippingerrors">
  ## 오류 건너뛰기
</div>

`CSV`, `TabSeparated`, `TSKV`, `JSONEachRow`, `Template`, `CustomSeparated`, `Protobuf`와 같은 일부 포맷은 파싱 오류가 발생하면 손상된 행을 건너뛰고 다음 행의 시작부터 파싱을 계속할 수 있습니다. [input\_format\_allow\_errors\_num](/docs/ko/reference/settings/formats#input_format_allow_errors_num) 및
[input\_format\_allow\_errors\_ratio](/docs/ko/reference/settings/formats#input_format_allow_errors_ratio) 설정을 참조하십시오.
제한 사항:

* 파싱 오류가 발생하면 `JSONEachRow`는 새 줄(또는 EOF)까지의 모든 데이터를 건너뛰므로, 오류 수를 올바르게 계산하려면 행이 `\n`으로 구분되어야 합니다.
* `Template`와 `CustomSeparated`는 다음 행의 시작을 찾기 위해 마지막 컬럼 뒤의 구분자와 행 사이의 구분자를 사용하므로, 둘 중 하나 이상이 비어 있지 않을 때만 오류 건너뛰기가 작동합니다.
