> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-postgresql-tls-support.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloud에 파일 업로드하기

> Cloud에 파일을 업로드하는 방법을 알아보세요

export const Image = ({img, alt, size = "lg"}) => {
  const normalizedSize = ["sm", "md", "lg"].includes(size) ? size : "lg";
  return <div className={`ch-image-${normalizedSize}`}>
      <Frame>
        <img src={img} alt={alt} />
      </Frame>
    </div>;
};

ClickHouse Cloud는 파일을 쉽게 가져올 수 있도록 지원하며, 다음 포맷을
지원합니다:

| Format                          |
| ------------------------------- |
| `CSV`                           |
| `CSVWithNamesAndTypes`          |
| `CSVWithNames`                  |
| `JSONEachRow`                   |
| `TabSeparated`                  |
| `TabSeparatedWithNames`         |
| `TabSeparatedWithNamesAndTypes` |

<Steps>
  <Step title="파일 업로드" id="upload-file">
    아래와 같이 Cloud 홈페이지에서 서비스를 선택하십시오:

    <Image img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/2QCOf7xGnBQgqjDM/images/cloud/migrate/csv_01.webp?fit=max&auto=format&n=2QCOf7xGnBQgqjDM&q=85&s=08894efadd065f0129e0845d44207564" alt="upload_file_02" width="3024" height="1483" data-path="images/cloud/migrate/csv_01.webp" />

    서비스가 유휴 상태이면 먼저 실행 상태로 전환해야 합니다.

    아래와 같이 왼쪽 탭에서 `Data sources`를 선택하십시오:

    <Image img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/2QCOf7xGnBQgqjDM/images/cloud/migrate/csv_02.webp?fit=max&auto=format&n=2QCOf7xGnBQgqjDM&q=85&s=b156c5d2337583efe03abb9d26733633" alt="upload_file_03" width="3024" height="1483" data-path="images/cloud/migrate/csv_02.webp" />

    다음으로 data sources 페이지 오른쪽에서 `Upload a file`을 선택하십시오:

    <Image img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/2QCOf7xGnBQgqjDM/images/cloud/migrate/csv_03.webp?fit=max&auto=format&n=2QCOf7xGnBQgqjDM&q=85&s=4897e4396d39e46c8ae1e1722c2fa30d" alt="upload_file_04" width="3024" height="1483" data-path="images/cloud/migrate/csv_03.webp" />

    파일 대화상자가 열리면 Cloud 서비스의 테이블에 데이터를 삽입하는 데 사용할
    파일을 선택할 수 있습니다.

    <Image img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/2QCOf7xGnBQgqjDM/images/cloud/migrate/csv_04.webp?fit=max&auto=format&n=2QCOf7xGnBQgqjDM&q=85&s=af53107b8ead2479d6a0c572f4c10215" alt="upload_file_05" width="1267" height="736" data-path="images/cloud/migrate/csv_04.webp" />
  </Step>

  <Step title="테이블 구성" id="configure-table">
    파일 업로드가 완료되면 데이터를 삽입할 테이블을 구성할 수 있습니다.
    처음 3개의 행이 포함된 테이블 미리보기도 표시됩니다.

    <Image img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/2QCOf7xGnBQgqjDM/images/cloud/migrate/csv_08.webp?fit=max&auto=format&n=2QCOf7xGnBQgqjDM&q=85&s=52f227296cb7ee1bd0c85f2ad61e3b05" alt="upload_file_08" width="3018" height="1476" data-path="images/cloud/migrate/csv_08.webp" />

    이제 대상 테이블을 선택할 수 있습니다. 옵션은 다음과 같습니다:

    * 새 테이블
    * 기존 테이블

    <br />

    데이터를 업로드할 데이터베이스를 지정할 수 있으며, 새 테이블인 경우
    생성할 테이블 이름도 지정할 수 있습니다. 또한 정렬 키도 선택할 수 있습니다:

    <Image img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/2QCOf7xGnBQgqjDM/images/cloud/migrate/csv_05.webp?fit=max&auto=format&n=2QCOf7xGnBQgqjDM&q=85&s=9be769cc1d35ad28e0b72c0ff952829a" alt="upload_file_05" width="3016" height="1474" data-path="images/cloud/migrate/csv_05.webp" />

    파일에서 읽은 컬럼은 `Source field`로 표시되며, 각 필드에 대해 다음을
    변경할 수 있습니다:

    * 추론된 타입
    * 기본값
    * 해당 컬럼을 [널 허용](/ko/reference/data-types/nullable)으로 설정할지 여부

    <Image img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/2QCOf7xGnBQgqjDM/images/cloud/migrate/csv_06.webp?fit=max&auto=format&n=2QCOf7xGnBQgqjDM&q=85&s=0a537d8db808c073e427ae89ff3a425c" alt="upload_file_06" width="3012" height="1476" data-path="images/cloud/migrate/csv_06.webp" />

    <Info>
      **필드 제외**

      가져오기에 포함하지 않으려는 경우 필드를 제거할 수도 있습니다.
    </Info>

    사용할 테이블 엔진 유형을 지정할 수 있습니다:

    * `MergeTree`
    * `ReplacingMergeTree`
    * `SummingMergeTree`
    * `Null`

    <br />

    파티셔닝 키 표현식과 프라이머리
    키 표현식을 지정할 수 있습니다.

    <Image img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/2QCOf7xGnBQgqjDM/images/cloud/migrate/csv_07.webp?fit=max&auto=format&n=2QCOf7xGnBQgqjDM&q=85&s=ef8e17f27335222f4fb633f4803adf3e" alt="upload_file_07" width="3004" height="1476" data-path="images/cloud/migrate/csv_07.webp" />

    데이터를 가져오려면 `Import to ClickHouse`(위에 표시됨)를 클릭하십시오. 데이터 가져오기는
    아래와 같이 `Status` 컬럼의 `queued` 상태 배지로 표시되며 큐에 추가됩니다. 또한
    `Open as query`(위에 표시됨)를 클릭하여 SQL 콘솔에서 삽입 쿼리를 열 수도 있습니다. 이 쿼리는
    `URL` 테이블 함수를 사용하여 S3 버킷에 업로드된 파일의 데이터를 삽입합니다.

    <Image img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/2QCOf7xGnBQgqjDM/images/cloud/migrate/csv_09.webp?fit=max&auto=format&n=2QCOf7xGnBQgqjDM&q=85&s=c1ea2e99081b657024b806a8b789c52b" alt="upload_file_09" width="1271" height="487" data-path="images/cloud/migrate/csv_09.webp" />

    작업이 실패하면 `Data upload history` 탭의 `Status` 컬럼에 `failed`
    상태 배지가 표시됩니다. 업로드 실패 원인에 대한 자세한 정보를 보려면
    `View Details`를 클릭할 수 있습니다. 실패한 삽입의 오류 메시지에 따라
    테이블 구성을 수정하거나 데이터를 정리해야 할 수 있습니다.

    <Image img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/2QCOf7xGnBQgqjDM/images/cloud/migrate/csv_10.webp?fit=max&auto=format&n=2QCOf7xGnBQgqjDM&q=85&s=05250476ae4330c90d189a68772466ba" alt="upload_file_11" width="1260" height="262" data-path="images/cloud/migrate/csv_10.webp" />
  </Step>
</Steps>
