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

> Amazon QuickSight는 데이터 기반 조직을 위한 통합 비즈니스 인텔리전스(BI)를 제공합니다.

# QuickSight

export const ClickHouseSupportedBadge = () => {
  return <div className="ClickHouseSupportedBadge">
            <div className="ClickHouseSupportedIcon">
                <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path d="M1.30762 1.39073C1.30762 1.3103 1.37465 1.22986 1.46849 1.22986H2.64824C2.72868 1.22986 2.80912 1.29689 2.80912 1.39073V14.4886C2.80912 14.5691 2.74209 14.6495 2.64824 14.6495H1.46849C1.38805 14.6495 1.30762 14.5825 1.30762 14.4886V1.39073Z" fill="currentColor" />
                    <path d="M4.2832 1.39073C4.2832 1.3103 4.35023 1.22986 4.44408 1.22986H5.62383C5.70427 1.22986 5.7847 1.29689 5.7847 1.39073V14.4886C5.7847 14.5691 5.71767 14.6495 5.62383 14.6495H4.44408C4.36364 14.6495 4.2832 14.5825 4.2832 14.4886V1.39073Z" fill="currentColor" />
                    <path d="M7.25977 1.39073C7.25977 1.3103 7.3268 1.22986 7.42064 1.22986H8.60039C8.68083 1.22986 8.76127 1.29689 8.76127 1.39073V14.4886C8.76127 14.5691 8.69423 14.6495 8.60039 14.6495H7.42064C7.3402 14.6495 7.25977 14.5825 7.25977 14.4886V1.39073Z" fill="currentColor" />
                    <path d="M10.2354 1.39073C10.2354 1.3103 10.3024 1.22986 10.3962 1.22986H11.576C11.6564 1.22986 11.7369 1.29689 11.7369 1.39073V14.4886C11.7369 14.5691 11.6698 14.6495 11.576 14.6495H10.3962C10.3158 14.6495 10.2354 14.5825 10.2354 14.4886V1.39073Z" fill="currentColor" />
                    <path d="M13.2256 6.6057C13.2256 6.52526 13.2926 6.44482 13.3865 6.44482H14.5662C14.6466 6.44482 14.7271 6.51186 14.7271 6.6057V9.27354C14.7271 9.35398 14.6601 9.43442 14.5662 9.43442H13.3865C13.306 9.43442 13.2256 9.36739 13.2256 9.27354V6.6057Z" fill="currentColor" />
                </svg>
            </div>
            ClickHouse 지원
        </div>;
};

export const Image = ({img, alt, size}) => {
  return <Frame>
      <img src={img} alt={alt} />
    </Frame>;
};

QuickSight는 공식 MySQL 데이터 소스와 Direct Query 모드를 사용해 MySQL 인터페이스를 통해 온프레미스 ClickHouse 환경(23.11+)에 연결할 수 있습니다.

<div id="on-premise-clickhouse-server-setup">
  ## 온프레미스 ClickHouse 서버 설정
</div>

MySQL 인터페이스를 활성화한 ClickHouse 서버를 설정하는 방법은 [공식 문서](/ko/concepts/features/interfaces/mysql)를 참조하십시오.

서버의 `config.xml`에 항목을 추가하는 것 외에도

```xml theme={null}
<clickhouse>
    <mysql_port>9004</mysql_port>
</clickhouse>
```

MySQL 인터페이스를 사용할 사용자에게는 [Double SHA1 비밀번호 암호화](/ko/concepts/features/configuration/settings/settings-users#user-namepassword)를 *반드시* 사용해야 합니다.

셸에서 Double SHA1으로 암호화된 임의의 비밀번호를 생성하는 방법:

```shell theme={null}
PASSWORD=$(base64 < /dev/urandom | head -c16); echo "$PASSWORD"; echo -n "$PASSWORD" | sha1sum | tr -d '-' | xxd -r -p | sha1sum | tr -d '-'
```

출력은 다음과 같아야 합니다:

```text theme={null}
LZOQYnqQN4L/T6L0
fbc958cc745a82188a51f30de69eebfc67c40ee4
```

첫 번째 줄은 생성된 비밀번호이고, 두 번째 줄은 ClickHouse 구성에 사용할 수 있는 해시입니다.

다음은 생성된 해시를 사용하는 `mysql_user`의 예시 구성입니다:

`/etc/clickhouse-server/users.d/mysql_user.xml`

```xml theme={null}
<users>
    <mysql_user>
        <password_double_sha1_hex>fbc958cc745a82188a51f30de69eebfc67c40ee4</password_double_sha1_hex>
        <networks>
            <ip>::/0</ip>
        </networks>
        <profile>default</profile>
        <quota>default</quota>
    </mysql_user>
</users>
```

`password_double_sha1_hex` 항목을 생성한 Double SHA1 해시 값으로 대체하십시오.

QuickSight를 사용하려면 MySQL 사용자 프로필에 몇 가지 추가 설정이 필요합니다.

`/etc/clickhouse-server/users.d/mysql_user.xml`

```xml theme={null}
<profiles>
    <default>
        <prefer_column_name_to_alias>1</prefer_column_name_to_alias>
        <mysql_map_string_to_text_in_show_columns>1</mysql_map_string_to_text_in_show_columns>
        <mysql_map_fixed_string_to_text_in_show_columns>1</mysql_map_fixed_string_to_text_in_show_columns>
    </default>
</profiles>
```

하지만 기본 프로필 대신 MySQL 사용자가 사용할 수 있는 별도의 프로필에 할당하는 것이 좋습니다.

마지막으로, ClickHouse 서버가 원하는 IP 주소에서 수신하도록 구성합니다.
`config.xml`에서 모든 주소에서 수신하려면 다음 항목의 주석을 해제합니다:

```bash theme={null}
<listen_host>::</listen_host>
```

`mysql` 바이너리를 사용할 수 있으면 명령줄에서 연결을 테스트할 수 있습니다.
위의 예시 사용자 이름(`mysql_user`)과 비밀번호(`LZOQYnqQN4L/T6L0`)를 사용하면 명령줄 명령은 다음과 같습니다.

```bash theme={null}
mysql --protocol tcp -h localhost -u mysql_user -P 9004 --password=LZOQYnqQN4L/T6L0
```

```response theme={null}
mysql> show databases;
+--------------------+
| name               |
+--------------------+
| INFORMATION_SCHEMA |
| default            |
| information_schema |
| system             |
+--------------------+
4 rows in set (0.00 sec)
Read 4 rows, 603.00 B in 0.00156 sec., 2564 rows/sec., 377.48 KiB/sec.
```

<div id="connecting-quicksight-to-clickhouse">
  ## QuickSight를 ClickHouse에 연결하기
</div>

먼저 [https://quicksight.aws.amazon.com](https://quicksight.aws.amazon.com)으로 이동한 다음, Datasets로 이동하여 "New dataset"을 클릭합니다:

<Image size="md" img="https://mintcdn.com/private-7c7dfe99-mintlify-fbfa8bee/m3SFJgFQv2eos7Pa/images/integrations/data-visualization/quicksight_01.png?fit=max&auto=format&n=m3SFJgFQv2eos7Pa&q=85&s=7955e5432d0bdf8b4c6e9c001370a5f6" alt="Datasets 섹션에서 New dataset 버튼이 표시된 Amazon QuickSight 대시보드" border width="1555" height="1038" data-path="images/integrations/data-visualization/quicksight_01.png" />

<br />

QuickSight에 포함된 공식 MySQL 커넥터(이름은 **MySQL**)를 검색합니다:

<Image size="md" img="https://mintcdn.com/private-7c7dfe99-mintlify-fbfa8bee/m3SFJgFQv2eos7Pa/images/integrations/data-visualization/quicksight_02.png?fit=max&auto=format&n=m3SFJgFQv2eos7Pa&q=85&s=1427cda51a1caff1a50e7f73a08bc39d" alt="검색 결과에서 MySQL이 강조 표시된 QuickSight 데이터 소스 선택 화면" border width="2006" height="1040" data-path="images/integrations/data-visualization/quicksight_02.png" />

<br />

연결 정보를 입력합니다. MySQL 인터페이스 포트의 기본값은 9004이며,
서버 구성에 따라 달라질 수 있습니다.

<Image size="md" img="https://mintcdn.com/private-7c7dfe99-mintlify-fbfa8bee/m3SFJgFQv2eos7Pa/images/integrations/data-visualization/quicksight_03.png?fit=max&auto=format&n=m3SFJgFQv2eos7Pa&q=85&s=cf911bdb60cdb0bcea5d73766bad573c" alt="호스트명, 포트, 데이터베이스 및 자격 증명 필드가 있는 QuickSight MySQL 연결 구성 양식" border width="1059" height="1143" data-path="images/integrations/data-visualization/quicksight_03.png" />

<br />

이제 ClickHouse에서 데이터를 가져오는 방법은 두 가지입니다. 먼저 목록에서 테이블을 선택할 수 있습니다:

<Image size="md" img="https://mintcdn.com/private-7c7dfe99-mintlify-fbfa8bee/m3SFJgFQv2eos7Pa/images/integrations/data-visualization/quicksight_04.png?fit=max&auto=format&n=m3SFJgFQv2eos7Pa&q=85&s=d574a98354e1d76f20e6450352c22ec1" alt="ClickHouse에서 사용할 수 있는 데이터베이스 테이블을 보여주는 QuickSight 테이블 선택 인터페이스" border width="1061" height="845" data-path="images/integrations/data-visualization/quicksight_04.png" />

<br />

또는 데이터를 가져오기 위해 사용자 지정 SQL을 지정할 수 있습니다:

<Image size="md" img="https://mintcdn.com/private-7c7dfe99-mintlify-fbfa8bee/m3SFJgFQv2eos7Pa/images/integrations/data-visualization/quicksight_05.png?fit=max&auto=format&n=m3SFJgFQv2eos7Pa&q=85&s=3f180b7742aa7d64e9f9e16ca9131eee" alt="ClickHouse에서 데이터를 가져오기 위한 QuickSight 사용자 지정 SQL 쿼리 편집기" border width="1061" height="845" data-path="images/integrations/data-visualization/quicksight_05.png" />

<br />

"Edit/Preview data"를 클릭하면 감지된 테이블 구조를 확인하거나, 해당 방식으로 데이터에 액세스하기로 했다면 사용자 지정 SQL을 조정할 수 있습니다:

<Image size="md" img="https://mintcdn.com/private-7c7dfe99-mintlify-fbfa8bee/m3SFJgFQv2eos7Pa/images/integrations/data-visualization/quicksight_06.png?fit=max&auto=format&n=m3SFJgFQv2eos7Pa&q=85&s=7257661c8f0e5c2de1c96b783b22f5cb" alt="컬럼과 샘플 데이터를 포함한 테이블 구조를 보여주는 QuickSight 데이터 미리 보기" border width="1743" height="1277" data-path="images/integrations/data-visualization/quicksight_06.png" />

<br />

UI의 왼쪽 아래에서 "Direct Query" 모드가 선택되어 있는지 확인합니다:

<Image size="md" img="https://mintcdn.com/private-7c7dfe99-mintlify-fbfa8bee/m3SFJgFQv2eos7Pa/images/integrations/data-visualization/quicksight_07.png?fit=max&auto=format&n=m3SFJgFQv2eos7Pa&q=85&s=83c5f6e0fedb1d0224674fdd4db72864" alt="하단 모서리에서 Direct Query 모드 옵션이 강조 표시된 QuickSight 인터페이스" border width="677" height="341" data-path="images/integrations/data-visualization/quicksight_07.png" />

<br />

이제 데이터셋을 게시하고 새 시각화를 만들 수 있습니다!

<div id="known-limitations">
  ## 알려진 제한 사항
</div>

* SPICE 가져오기가 예상대로 작동하지 않으므로 대신 Direct Query 모드를 사용하십시오. 자세한 내용은 [#58553](https://github.com/ClickHouse/ClickHouse/issues/58553)을 참조하십시오.
