OpenTelemetry에서는 모든 트레이스 스팬이 리소스 속성 집합을 가집니다 — 이는 텔레메트리를 생성한 엔터티(service name, host, cloud region, Kubernetes 파드 등)를 설명하는 키-값 메타데이터입니다. 키 집합은 서비스와 환경에 따라 달라지므로 ClickHouse의 Map 타입에 잘 맞습니다. 키는 동적이고 애플리케이션별로 달라지지만, 각 행에는 보통 몇 개만 들어 있습니다.이 빠른 시작에서는 clickhouse-local을 사용해 CSV 파일의 실제 OTel 트레이스 데이터를 Map(LowCardinality(String), String) 컬럼이 있는 테이블에 적재하고, 맵 데이터를 쿼리, 필터링, 집계, 최적화하는 방법을 알아봅니다.
1
샘플 데이터 다운로드
이 데이터셋에는 데모 마이크로서비스 애플리케이션에서 내보낸 6,120개의 OTel trace 스팬이 포함되어 있습니다. 각 행에는 JSON 맵 형태의 동적 key-value 쌍이 포함된 ResourceAttributes 및 SpanAttributes 컬럼이 있습니다.
파일은 예를 들어 ~/data/data-otel-traces.csv처럼 쉽게 참조할 수 있는 디렉터리에 저장하십시오.data-otel-traces.csv 다운로드 (2.9 MB)단일 행은 다음과 같습니다:
clickhouse-local을 실행한 다음, CSV 스키마에 맞춰 다음 테이블을 생성합니다.
키 컬럼은 ResourceAttributes Map(LowCardinality(String), String)이며, OTel 속성 키는 비교적 적은 수의 반복되는 집합에서 나오므로 키 타입에 LowCardinality를 사용합니다.
이제 file 테이블 엔진을 사용해 CSV를 불러오십시오. 파일을 저장한 위치에 맞게 경로를 조정하십시오:
INSERT INTO otel_tracesSELECT * FROM file('~/data/data-otel-traces.csv', CSVWithNames);
데이터가 로드되었는지 확인하세요:
SELECT count() FROM otel_traces;
6,120개 행이 표시되어야 합니다.
3
데이터 쿼리
특정 키에 액세스하기 — 대괄호 구문을 사용해 맵에서 값을 꺼낼 수 있습니다. 해당 행에 키가 없으면 값 유형의 기본값이 반환됩니다(String은 빈 문자열):
SELECT ServiceName, SpanName, ResourceAttributes['host.name'] AS host, ResourceAttributes['k8s.pod.name'] AS pod, ResourceAttributes['deployment.environment'] AS envFROM otel_tracesLIMIT 10;
맵 값으로 필터링 — 특정 서비스 이름의 모든 스팬 찾기:
SELECT Timestamp, SpanName, Duration / 1e6 AS duration_msFROM otel_tracesWHERE ResourceAttributes['service.name'] = 'cartservice'ORDER BY TimestampLIMIT 10;
키 존재 여부 확인 — 모든 스팬에 Kubernetes 메타데이터가 있는 것은 아닙니다. 어떤 스팬에 메타데이터가 있는지 찾으려면 mapContains를 사용합니다:
SELECT ServiceName, SpanName, mapContains(ResourceAttributes, 'k8s.node.name') AS has_node_infoFROM otel_tracesLIMIT 10;
데이터셋 전체에 있는 모든 키 확인 — 어떤 계측 데이터가 생성되는지 파악하는 데 유용합니다:
SELECT DISTINCT arrayJoin(mapKeys(ResourceAttributes)) AS keyFROM otel_tracesORDER BY key;
ARRAY JOIN으로 맵을 행으로 펼치기 — 각 키-값 쌍을 개별 행으로 변환하므로, 속성 목록을 만들거나 대시보드용 데이터를 구성할 때 유용합니다:
SELECT ServiceName, key, valueFROM otel_tracesARRAY JOIN mapKeys(ResourceAttributes) AS key, mapValues(ResourceAttributes) AS valueWHERE ServiceName = 'cartservice'LIMIT 20;
mapFilter로 맵 필터링하기 — 각 스팬에서 Kubernetes 관련 속성만 추출합니다:
SELECT ServiceName, mapFilter((k, v) -> k LIKE 'k8s.%', ResourceAttributes) AS k8s_attrsFROM otel_tracesWHERE mapContains(ResourceAttributes, 'k8s.pod.name')LIMIT 10;
오류 스팬과 해당 resource 컨텍스트 찾기 — 일반 컬럼 필터와 맵 접근을 함께 사용합니다:
SELECT Timestamp, ServiceName, SpanName, ResourceAttributes['host.name'] AS host, ResourceAttributes['k8s.pod.name'] AS pod, SpanAttributes['error.type'] AS error_type, SpanAttributes['error.message'] AS error_messageFROM otel_tracesWHERE StatusCode = 'STATUS_CODE_ERROR';
4
-Map 조합자로 맵 전체에 걸쳐 집계하기
ClickHouse의 -Map 집계 조합자를 사용하면 Map 컬럼에 어떤 집계 함수든 적용해 각 키별로 독립적으로 집계할 수 있습니다. 결과 역시 Map이며, 각 키마다 하나의 항목과 해당 집계값이 포함됩니다. 이는 카운터나 게이지가 맵 값으로 저장되는 OTel 메트릭에서 특히 유용합니다.이를 보여주기 위해, 각 행이 HTTP 상태 코드별 개수를 Map(String, UInt64)로 기록하는 작은 메트릭 테이블을 생성합니다:
SELECT ServiceName, sumMap(StatusCounts) AS total_by_statusFROM otel_http_status_countsGROUP BY ServiceName;
-Map 접미사는 모든 집계 함수와 함께 사용할 수 있으므로 minMap, maxMap, avgMap도 같은 방식으로 쉽게 사용할 수 있습니다:
SELECT ServiceName, avgMap(StatusCounts) AS avg_by_status, maxMap(StatusCounts) AS peak_by_statusFROM otel_http_status_countsGROUP BY ServiceName;
다른 combinator와 함께 사용할 수도 있습니다. 예를 들어 sumMapIf를 사용하면 조건에 따라 집계할 수 있습니다. 여기서는 서비스에 이미 오류가 있었던 분 단위 윈도우만 합산합니다:
SELECT ServiceName, sumMapIf(StatusCounts, StatusCounts['5xx'] > 0) AS totals_in_error_windowsFROM otel_http_status_countsGROUP BY ServiceName;
OTel에서 이것이 중요한 이유: OTel Collector가 분 단위 상태 코드별 집계를 ClickHouse에 기록할 때 sumMap을 사용하면 이를 단일 쿼리로 시간별 또는 일별 합계로 집계할 수 있습니다 — ARRAY JOIN도, 언피벗도, 전체 키 집합을 미리 파악하는 작업도 필요하지 않습니다. 어떤 키든 하나의 행에라도 나타나면 결과에 자동으로 포함됩니다.
5
자주 쿨리하는 키에 맞춰 최적화
같은 맵 키로 계속 필터링하는 경우 — host.name가 대표적인 예입니다 — 이를 구체화된 컬럼(Materialized Column)으로 추출할 수 있습니다. 이렇게 하면 쿼리할 때마다 맵 전체를 선형 스캔하지 않아도 됩니다:
ALTER TABLE otel_traces ADD COLUMN HostName String MATERIALIZED ResourceAttributes['host.name'];
기존 데이터에도 컬럼을 백필하세요:
ALTER TABLE otel_traces MATERIALIZE COLUMN HostName;
이제 WHERE HostName = 'prod-cart-01'는 전체 맵 대신 해당 전용 단일 컬럼만 읽습니다. 이는 자주 쿼리하는 속성에 대해 OTel ClickHouse 스키마(schema)에서 권장되는 패턴입니다.
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"ClickHouse Documentation","colors":{"primary":"#1c1c1c","light":"#333431","dark":"#fdff75"},"logo":{"light":"https://mintcdn.com/private-7c7dfe99/h2VHbIjccjT9ClSc/_site/logo/light.svg?fit=max\u0026auto=format\u0026n=h2VHbIjccjT9ClSc\u0026q=85\u0026s=b8a838f982def2b530a95016300bc7ec","dark":"https://mintcdn.com/private-7c7dfe99/h2VHbIjccjT9ClSc/_site/logo/dark.svg?fit=max\u0026auto=format\u0026n=h2VHbIjccjT9ClSc\u0026q=85\u0026s=563dcf3fc5bb3694597dec207c9b4ecf"},"favicon":"https://mintcdn.com/private-7c7dfe99/h2VHbIjccjT9ClSc/_site/favicon.svg?fit=max\u0026auto=format\u0026n=h2VHbIjccjT9ClSc\u0026q=85\u0026s=9a2d9de19e9259c4b5260fa5bfa26851","appearance":{"default":"dark"},"background":{"color":{"light":"#FFFFFF","dark":"#151515"}},"navbar":{},"fonts":{"family":"Inter"},"styling":{"eyebrows":"breadcrumbs","latex":true},"integrations":{"clarity":{"projectId":"xgummrwgj9"},"gtm":{"tagId":"GTM-WTNTDT7W"}},"contextual":{"options":["copy","view","download-pdf",{"title":"Set up the ClickHouse documentation MCP server","description":"Setup instructions for the ClickHouse documentation MCP server","icon":"/images/icons/icon-mcp.svg","href":"https://clickhouse.com/docs/resources/support-center/knowledge-base/setup-installation/set-up-clickhouse-documentation-mcp-server"}],"display":"toc"},"interaction":{"drilldown":false},"metadata":{"timestamp":true},"variables":{"airgap_server_tag":"26.4.1.2709","airgap_keeper_tag":"26.2.1.258","airgap_operator_tag":"1.22992.1","airgap_cr_helm_tag":"1.11.11","airgap_api_tag":"1.175.4","airgap_api_helm_tag":"1.175.4","airgap_preflight_chart_tag":"1.38.7","airgap_support_bundle_tag":"1.12.0"},"navigation":{"languages":[{"language":"en","href":""},{"language":"ar","href":"ar"},{"language":"es","href":"es"},{"language":"fr","href":"fr"},{"language":"ja","href":"ja"},{"language":"ko","href":"ko"},{"language":"pt-BR","href":"pt-BR"},{"language":"ru","href":"ru"},{"language":"zh","href":"zh"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"private-7c7dfe99","hasAudioNarration":false,"actualSubdomain":"private-7c7dfe99","customDomains":["clickhouse.com"],"gitSource":{"_id":"6ad7fa91692c7c940ff17a19","type":"github","owner":"clickhouse","repo":"clickhouse","deployBranch":"master","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae8d9fc28a88ed9db40f71c","collectionId":"2dfa09da-3a3e-4782-ad6a-6694be472bd7","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae8d9fc28a88ed9db40f71c"},"feedback":{"thumbs":true,"edits":true,"issues":true,"contextualFeedback":{"allowEmail":false},"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED","enabled":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae8d9fc28a88ed9db40f71c","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"en","tag":"Database","count":1751},{"language":"ja","tag":"データベース","count":1737},{"language":"pt-BR","tag":"Banco de dados","count":1737},{"language":"zh","tag":"数据库","count":1737},{"language":"ar","tag":"قاعدة البيانات","count":1736},{"language":"es","tag":"Base de datos","count":1736},{"language":"fr","tag":"Base de données","count":1736},{"language":"ko","tag":"데이터베이스","count":1736},{"language":"ru","tag":"База данных","count":1736},{"language":"en","tag":"Reference","count":1576},{"language":"ar","tag":"المرجع","count":1565},{"language":"es","tag":"Referencia","count":1565},{"language":"fr","tag":"Référence","count":1565},{"language":"ja","tag":"リファレンス","count":1565},{"language":"ko","tag":"참고","count":1565},{"language":"pt-BR","tag":"Referência","count":1565},{"language":"ru","tag":"Справочник","count":1565},{"language":"zh","tag":"参考文档","count":1565},{"language":"en","tag":"Solutions","count":560},{"language":"ar","tag":"الحلول","count":554},{"language":"es","tag":"Soluciones","count":554},{"language":"fr","tag":"Solutions","count":554},{"language":"ja","tag":"ソリューション","count":554},{"language":"ko","tag":"솔루션","count":554},{"language":"pt-BR","tag":"Soluções","count":554},{"language":"ru","tag":"Решения","count":554},{"language":"zh","tag":"解决方案","count":554},{"language":"es","tag":"Configuración","count":531},{"language":"ja","tag":"設定","count":531},{"language":"en","tag":"Settings","count":509},{"language":"ar","tag":"الإعدادات","count":505},{"language":"fr","tag":"Paramètres","count":505},{"language":"ko","tag":"설정","count":505},{"language":"pt-BR","tag":"Configurações","count":505},{"language":"ru","tag":"Настройки","count":505},{"language":"zh","tag":"设置","count":505},{"language":"en","tag":"Functions","count":330},{"language":"ar","tag":"الدوال","count":328},{"language":"es","tag":"Funciones","count":328},{"language":"fr","tag":"Fonctions","count":328},{"language":"ja","tag":"関数","count":328},{"language":"ko","tag":"함수","count":328},{"language":"pt-BR","tag":"Funções","count":328},{"language":"ru","tag":"Функции","count":328},{"language":"zh","tag":"函数","count":328},{"language":"en","tag":"Integrations","count":300},{"language":"ko","tag":"통합","count":296},{"language":"zh","tag":"集成","count":296},{"language":"ar","tag":"التكاملات","count":293},{"language":"es","tag":"Integraciones","count":293},{"language":"fr","tag":"Intégrations","count":293},{"language":"pt-BR","tag":"Integrações","count":293},{"language":"ru","tag":"Интеграции","count":293},{"language":"pt-BR","tag":"Recursos","count":291},{"language":"ja","tag":"インテグレーション","count":268},{"language":"en","tag":"Session Settings","count":261},{"language":"ar","tag":"إعدادات session","count":260},{"language":"es","tag":"Configuración de sesión","count":260},{"language":"fr","tag":"Paramètres de session","count":260},{"language":"ja","tag":"session 設定","count":260},{"language":"ko","tag":"세션 설정","count":260},{"language":"pt-BR","tag":"Configurações de sessão","count":260},{"language":"ru","tag":"Настройки сеанса","count":260},{"language":"zh","tag":"会话设置","count":260},{"language":"en","tag":"ClickHouse Cloud","count":256},{"language":"ar","tag":"ClickHouse Cloud","count":255},{"language":"es","tag":"ClickHouse Cloud","count":255},{"language":"fr","tag":"ClickHouse Cloud","count":255},{"language":"ja","tag":"ClickHouse Cloud","count":255},{"language":"ko","tag":"ClickHouse Cloud","count":255},{"language":"pt-BR","tag":"ClickHouse Cloud","count":255},{"language":"ru","tag":"ClickHouse Cloud","count":255},{"language":"zh","tag":"ClickHouse Cloud","count":255},{"language":"ar","tag":"أدلة إرشادية","count":219},{"language":"en","tag":"Guides","count":219},{"language":"es","tag":"Guías","count":219},{"language":"fr","tag":"Guides","count":219},{"language":"ja","tag":"ガイド","count":219},{"language":"ko","tag":"가이드","count":219},{"language":"pt-BR","tag":"Guias","count":219},{"language":"ru","tag":"Руководства","count":219},{"language":"zh","tag":"指南","count":219},{"language":"ar","tag":"الموارد","count":213},{"language":"en","tag":"Resources","count":213},{"language":"es","tag":"Recursos","count":213},{"language":"fr","tag":"Ressources","count":213},{"language":"ja","tag":"リソース","count":213},{"language":"ko","tag":"자료","count":213},{"language":"ru","tag":"Ресурсы","count":213},{"language":"zh","tag":"资源","count":213},{"language":"default","tag":"Solutions","count":125},{"language":"default","tag":"ClickHouse Cloud","count":125},{"language":"default","tag":"Cloud API","count":83},{"language":"default","tag":"API reference","count":83},{"language":"default","tag":"ClickHouse Private","count":42},{"language":"default","tag":"ClickStack","count":31},{"language":"default","tag":"Service","count":24},{"language":"default","tag":"Organization","count":21},{"language":"default","tag":"Postgres","count":18},{"language":"default","tag":"How-To Guides","count":17}],"searchSettings":{"maxResults":1}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"github-push-net-diff","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"_site/styles.css","href":"/docs/_mintlify/custom/private-7c7dfe99/2a1d0d506d6c7ad1/_site/styles.css"},{"filePath":"snippets/components/Badges/badges_styles.css","content":".ClickHouseSupportedBadge,.betaBadge{background-color:#dbeafe;border-radius:16px;display:flex;align-items:center;padding:5px 12px;color:#1d4ed8;display:inline-flex;margin-right:5px;font-size:.875rem}.betaBadge::before{content:\"β\";flex:0 0 auto;margin-right:8px;font-size:1rem;font-weight:600;line-height:1}.dark a.betaBadge,a.betaBadge{color:#1d4ed8!important;text-decoration:none!important}.dark .betaBadge{background-color:#1e3a6b;color:#93c5fd}.dark a.betaBadge{color:#93c5fd!important}.ClickHouseSupportedBadge{background-color:#faff69;color:#161517}.ClickHouseSupportedIcon{margin-right:8px}.ClickHouseSupportedIcon svg path{fill:#282828}.ClickHouseSupportedBadge a{color:#000}.dark .ClickHouseSupportedBadge{background-color:#faff69;color:#161517}.dark .ClickHouseSupportedBadge a{color:#161517}.dark .ClickHouseSupportedIcon svg path{fill:#161517}.cloudNotSupportedBadge{background-color:#f6e5ff;color:#609;border-radius:16px;display:flex;align-items:center;padding:5px 12px;display:inline-flex;margin-right:5px;font-size:.875rem}.cloudNotSupportedIcon{margin-right:8px}a.cloudNotSupportedBadge{color:#609!important;text-decoration:none!important}.cloudNotSupportedIcon svg path{stroke:#609}.dark .cloudNotSupportedBadge{background-color:#33004d;color:#ecf}.dark a.cloudNotSupportedBadge{color:#ecf!important;text-decoration:none!important}.dark .cloudNotSupportedIcon svg path{stroke:#ecf}.cloudBadge{background-color:#dae6fc;color:#061d48;border-radius:16px;display:flex;align-items:center;padding:5px 12px;display:inline-flex;margin-right:5px;font-size:.875rem}.dark .cloudBadge{background-color:#061d48;color:#dae6fc}.cloudIcon{margin-right:8px}.cloudIcon svg path{stroke:#061d48}.dark .cloudIcon svg path{stroke:#dae6fc}.CommunityMaintainedBadge{background-color:#69afff;border-radius:16px;display:flex;align-items:center;padding:5px 12px;color:#fff;display:inline-flex;margin-right:5px;font-size:.875rem}.CommunityMaintainedIcon{margin-right:8px}.CommunityMaintainedIcon svg path,.dark .CommunityMaintainedIcon svg path{fill:#fff;stroke:none}.CommunityMaintainedBadge a,.CommunityMaintainedBadge svg path{color:#69afff}.dark .CommunityMaintainedBadge{background-color:#69afff;color:#fff}.dark .CommunityMaintainedBadge a{color:#fff}.deprecatedBadge{background-color:#dfdfdf;color:#53575f;border-radius:16px;display:flex;align-items:center;padding:5px 12px;display:inline-flex;margin-right:5px;font-size:.875rem}.deprecatedIcon{margin-right:8px}.dark .deprecatedBadge a,.deprecatedBadge a{color:inherit}.dark .deprecatedBadge{background-color:#414141;color:#e6e7e9}.deprecatedIcon svg path{stroke:#53575f}.dark .deprecatedIcon svg path{stroke:#e6e7e9}.enterprisePlanFeatureContainer{background-color:#f6f7fa;border-radius:4px;border:1px solid #e6e7e9;padding:12px 16px;margin-bottom:8px;font-size:.875rem}.enterprisePlanFeatureContainer p,.scalePlanFeatureContainer p{margin:0;padding:0}.enterprisePlanFeatureBadge,.experimentalBadge{border-radius:16px;display:flex;align-items:center;display:inline-flex;font-size:.875rem}.enterprisePlanFeatureBadge{background-color:#008a0b;border:1px;border-color:#437eef;color:#fff;padding:2px 12px;margin-bottom:8px}.dark .enterprisePlanFeatureContainer{background-color:#1f1f1c;border:1px solid #414141}.dark .enterprisePlanFeatureBadge{background-color:#99ffa1;color:#1f1f1c}.experimentalBadge{background-color:#f3e8ff;color:#6d28d9;padding:5px 12px;margin-right:5px}.experimentalIcon{margin-right:8px}.dark a.experimentalBadge,a.experimentalBadge{color:#6d28d9!important;text-decoration:none!important}.dark .experimentalBadge{background-color:#3b1d6b;color:#d8b4fe}.dark a.experimentalBadge{color:#d8b4fe!important}.experimentalIcon svg path{stroke:#6d28d9}.dark .experimentalIcon svg path{stroke:#d8b4fe}.PartnerBadge{background-color:#990073;border-radius:16px;display:flex;align-items:center;padding:5px 12px;color:#fff;display:inline-flex;margin-right:5px;font-size:.875rem}.PartnerBadgeIcon{margin-right:8px}.PartnerBadgeIcon svg path{fill:#fbc9ef;stroke:#990073}.PartnerBadge a,.PartnerBadge svg path{color:#990073}.dark .PartnerBadge{background-color:#990073;color:#fbeff8}.dark .PartnerBadge a{color:#fbeff8}.dark .PartnerBadgeIcon svg path{fill:#990073;stroke:#fbeff8}.privatePreviewBadge{background-color:#fef3c7;color:#b45309;border-radius:16px;display:flex;align-items:center;padding:5px 12px;display:inline-flex;margin-right:5px;font-size:.875rem}.dark .privatePreviewBadge{background-color:#4b3410;color:#fcd34d}.privatePreviewIcon{margin-right:8px}.privatePreviewIcon svg path{stroke:#b45309}.dark .privatePreviewIcon svg path{stroke:#fcd34d}.publicPreviewBadge{background-color:#dbeafe;border-radius:16px;display:flex;align-items:center;padding:5px 12px;color:#1d4ed8;display:inline-flex;margin-right:5px;font-size:.875rem}.dark .publicPreviewBadge{background-color:#1e3a6b;color:#93c5fd}.scalePlanFeatureContainer{background-color:#f6f7fa;border-radius:4px;border:1px solid #e6e7e9;padding:12px 16px;margin-bottom:8px;font-size:.875rem}.scalePlanFeatureBadge{border-radius:16px;display:flex;align-items:center;display:inline-flex;padding:2px 12px;margin-bottom:8px;font-size:.875rem}.dark .scalePlanFeatureContainer{background-color:#1f1f1c;border:1px solid #414141}.dark .scalePlanFeatureBadge,.scalePlanFeatureBadge{background-color:#1d64ec;color:#fff}"},{"filePath":"snippets/components/ClickStackAnimation/ClickStackAnimation.css","content":"@keyframes fadeInOut{0%,to{opacity:.3}50%{opacity:.8}}.clickstack-animation-wrapper{width:100%;max-width:max-content;transition:opacity .3s ease}.clickstack-animation-inner{transform-origin:top left}.clickstack-grid{display:grid;width:537px;height:537px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr)}.clickstack-grid-item{position:relative;display:flex;align-items:center;justify-content:center}.clickstack-grid-column{display:flex;flex-direction:column;align-items:center}.clickstack-icon-box{display:flex;width:4rem;height:4rem;align-items:center;justify-content:center;border-radius:.375rem;padding:1rem;flex-shrink:0;border:1px solid rgba(113,113,122,.8);background-color:#171717}.clickstack-svg-absolute{position:absolute}.clickstack-svg-left-center{left:50%;top:50%;transform:translateY(2rem)}.clickstack-svg-right-center{right:50%;top:50%;transform:translateY(2rem)}.clickstack-svg-bottom-left{bottom:50%;left:50%;transform:translateY(-2rem)}.clickstack-svg-bottom-right{bottom:50%;right:50%;transform:translateY(-2rem)}.clickstack-logo-container{position:relative}.clickstack-logo-glow{position:absolute;inset:0;z-index:0;animation:fadeInOut 3s ease-in-out infinite;background-color:rgba(250,255,105,.6);filter:blur(40px)}.clickstack-logo-box{position:absolute;inset:0;z-index:10;display:flex;border-radius:.5rem;border:2px solid #faff69;background-color:#262626;background-image:linear-gradient(to bottom right,rgba(250,255,105,.2),rgba(250,255,105,.4))}.clickstack-logo-svg{margin:auto}:is(.light) .clickstack-logo-glow{display:none}:is(.light) .clickstack-logo-box{border-color:#faff69;background-color:#000;background-image:none}.clickstack-line-bg{stroke:#414141}.clickstack-line-animated{stroke:#faff69}:is(.light) .clickstack-line-bg{stroke:#d4d4d8}:is(.light) .clickstack-line-animated{stroke:#a1a1aa}@media (max-width:767px){.clickstack-animation-wrapper{max-width:400px}.clickstack-grid{width:400px;height:400px}}"}],"page":{"pagePath":"ko/get-started/quickstarts/working-with-the-map-type","slug":"/ko/get-started/quickstarts/working-with-the-map-type","pageMetadata":{"sidebarTitle":"ClickHouse에서 맵 타입 사용하기","searchable":true,"title":"ClickHouse에서 맵 타입 사용하기","useCases":["관측성"],"products":["OSS"],"description":"OTel 리소스 속성을 예시로, ClickHouse에서 동적 키-값 데이터를 저장, 쿼리, 집계하는 데 맵 타입을 사용하는 방법을 알아봅니다.","href":"/ko/get-started/quickstarts/working-with-the-map-type"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"OTel 리소스 속성을 예시로, ClickHouse에서 동적 키-값 데이터를 저장, 쿼리, 집계하는 데 맵 타입을 사용하는 방법을 알아봅니다.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const e_1=undefined;const e_0=undefined;function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Badge,CodeBlock,Frame,Heading,Step,Steps}=_components;if(!Badge)_missingMdxReference(`Badge`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.a,{href:`/get-started/quickstarts/home`,onClick:e_0=>{e_0.preventDefault();window.location.href=(window.location.pathname.startsWith(`/docs`)?`/docs`:``)+`/get-started/quickstarts/home`},className:`mint-inline-flex mint-items-center mint-gap-1.5 mint-text-sm mint-text-gray-500 dark:mint-text-zinc-500 hover:mint-text-gray-900 dark:hover:mint-text-[#fdff75] mint-transition-colors mint-font-normal mint-no-underline`,children:[_jsxs(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`mint-shrink-0`,children:[_jsx(`path`,{d:`M19 12H5`}),_jsx(`path`,{d:`M12 19l-7-7 7-7`})]}),`All quickstarts`]}),`\n`,_jsxs(`div`,{className:`mint-mt-2 mint-flex mint-flex-wrap mint-gap-2`,children:[_jsx(Badge,{size:`lg`,color:`blue`,children:`관측성`}),_jsx(Badge,{size:`lg`,color:`orange`,children:`OSS`})]}),`\n`,_jsx(`div`,{id:`prerequisites`,children:_jsx(Heading,{level:`2`,id:`사전-요구-사항`,children:`사전 요구 사항`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`clickhouse-local`}),`이 로컬 머신에 설치되어 있어야 합니다. 시작하려면 `,_jsx(_components.a,{href:`/ko/concepts/features/tools-and-utilities/clickhouse-local`,children:`clickhouse-local 설정 가이드`}),`를 참조하십시오.`]}),`\n`]}),`\n`,_jsx(`div`,{id:`what-youll-build`,children:_jsx(Heading,{level:`2`,id:`구축할-내용`,children:`구축할 내용`})}),`\n`,_jsxs(_components.p,{children:[`OpenTelemetry에서는 모든 트레이스 스팬이 `,_jsx(_components.strong,{children:`리소스 속성`}),` 집합을 가집니다 — 이는 텔레메트리를 생성한 엔터티(service name, host, cloud region, Kubernetes 파드 등)를 설명하는 키-값 메타데이터입니다. 키 집합은 서비스와 환경에 따라 달라지므로 ClickHouse의 `,_jsx(_components.code,{children:`Map`}),` 타입에 잘 맞습니다. 키는 동적이고 애플리케이션별로 달라지지만, 각 행에는 보통 몇 개만 들어 있습니다.`]}),`\n`,_jsxs(_components.p,{children:[`이 빠른 시작에서는 `,_jsx(_components.code,{children:`clickhouse-local`}),`을 사용해 CSV 파일의 실제 OTel 트레이스 데이터를 `,_jsx(_components.code,{children:`Map(LowCardinality(String), String)`}),` 컬럼이 있는 테이블에 적재하고, 맵 데이터를 쿼리, 필터링, 집계, 최적화하는 방법을 알아봅니다.`]}),`\n`,_jsxs(Steps,{titleSize:`h3`,children:[_jsxs(Step,{title:`샘플 데이터 다운로드`,id:`download-the-sample-data`,children:[_jsxs(_components.p,{children:[`이 데이터셋에는 데모 마이크로서비스 애플리케이션에서 내보낸 6,120개의 OTel trace 스팬이 포함되어 있습니다. 각 행에는 JSON 맵 형태의 동적 key-value 쌍이 포함된 `,_jsx(_components.code,{children:`ResourceAttributes`}),` 및 `,_jsx(_components.code,{children:`SpanAttributes`}),` 컬럼이 있습니다.\n파일은 예를 들어 `,_jsx(_components.code,{children:`~/data/data-otel-traces.csv`}),`처럼 쉽게 참조할 수 있는 디렉터리에 저장하십시오.`]}),_jsxs(`a`,{href:`https://clickhouse-docs-assets.s3.us-east-1.amazonaws.com/data-otel-traces.csv`,download:true,className:`mint-inline-flex mint-items-center mint-gap-2 mint-px-3 mint-py-1.5 mint-text-sm mint-font-medium mint-rounded-lg mint-border mint-border-gray-300 dark:mint-border-white/20 mint-bg-white dark:mint-bg-[#1B1B18] mint-text-black dark:mint-text-white hover:mint-border-[#FAFF69] mint-transition-all mint-no-underline mint-mb-4`,children:[_jsx(`svg`,{width:`14`,height:`14`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:_jsx(`path`,{d:`M8 1v10M8 11L4.5 7.5M8 11l3.5-3.5M2 13h12`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),_jsx(_components.p,{children:`data-otel-traces.csv 다운로드 (2.9 MB)`})]}),_jsx(_components.p,{children:`단일 행은 다음과 같습니다:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Timestamp: 2025-12-26 00:00:45.759467000`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`TraceId: 0da128e6e3c01bc38b6b43a33e5fa522`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`SpanId: 3774f759424e4006`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ParentSpanId: 2fdd1e5b66605098`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`SpanName: orders receive`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`SpanKind: SPAN_KIND_CONSUMER`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ServiceName: accountingservice`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Duration: 5361`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`StatusCode: STATUS_CODE_UNSET`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ResourceAttributes: {\"host.name\":\"f19476836e47\",\"os.type\":\"linux\",\"process.pid\":\"1\",\"process.command_args\":\"[\\\\\"./accountingservice\\\\\"]\",\"process.executable.path\":\"...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`SpanAttributes: {\"network.transport\":\"tcp\",\"messaging.destination.name\":\"orders\",\"messaging.kafka.message.offset\":\"232260\",\"messaging.message.body.size\":\"216\"...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]}),_jsxs(Step,{title:`테이블을 생성하고 데이터를 로드합니다`,id:`create-the-table-and-load-the-data`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`clickhouse-local`}),`을 실행한 다음, CSV 스키마에 맞춰 다음 테이블을 생성합니다.\n키 컬럼은 `,_jsx(_components.code,{children:`ResourceAttributes Map(LowCardinality(String), String)`}),`이며, OTel 속성 키는 비교적 적은 수의 반복되는 집합에서 나오므로 키 타입에 `,_jsx(_components.code,{children:`LowCardinality`}),`를 사용합니다.`]}),_jsx(CodeBlock,{filename:``,highlight:`[12]`,numberOfLines:`16`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`CREATE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` TABLE`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` otel_traces`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` Timestamp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` DateTime64(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TraceId String,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpanId String,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ParentSpanId String,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpanName LowCardinality(String),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpanKind LowCardinality(String),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName LowCardinality(String),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Duration UInt64,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` StatusCode LowCardinality(String),`})}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ResourceAttributes Map(LowCardinality(String), String),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpanAttributes Map(LowCardinality(String), String)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ENGINE `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` MergeTree()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ORDER BY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (ServiceName, SpanName, toUnixTimestamp(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`Timestamp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`이제 `,_jsx(_components.code,{children:`file`}),` 테이블 엔진을 사용해 CSV를 불러오십시오. 파일을 저장한 위치에 맞게 경로를 조정하십시오:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`INSERT INTO`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` FROM`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` file`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'~/data/data-otel-traces.csv'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, CSVWithNames);`})]}),`\n`]})})}),_jsx(_components.p,{children:`데이터가 로드되었는지 확인하세요:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` count`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces;`})]}),`\n`]})})}),_jsx(_components.p,{children:`6,120개 행이 표시되어야 합니다.`})]}),_jsxs(Step,{title:`데이터 쿼리`,id:`query-the-data`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`특정 키에 액세스하기`}),` — 대괄호 구문을 사용해 맵에서 값을 꺼낼 수 있습니다. 해당 행에 키가 없으면 값 유형의 기본값이 반환됩니다(`,_jsx(_components.code,{children:`String`}),`은 빈 문자열):`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpanName,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ResourceAttributes['host.name'] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` host,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ResourceAttributes['k8s.pod.name'] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pod,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ResourceAttributes['deployment.environment'] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` env`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LIMIT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`맵 값으로 필터링`}),` — 특정 서비스 이름의 모든 스팬 찾기:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` Timestamp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpanName,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Duration `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 1e6 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` duration_ms`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ResourceAttributes['service.name'] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'cartservice'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ORDER BY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` Timestamp`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LIMIT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`키 존재 여부 확인`}),` — 모든 스팬에 Kubernetes 메타데이터가 있는 것은 아닙니다. 어떤 스팬에 메타데이터가 있는지 찾으려면 `,_jsx(_components.code,{children:`mapContains`}),`를 사용합니다:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpanName,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` mapContains(ResourceAttributes, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'k8s.node.name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` has_node_info`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LIMIT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`데이터셋 전체에 있는 모든 키 확인`}),` — 어떤 계측 데이터가 생성되는지 파악하는 데 유용합니다:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT DISTINCT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` arrayJoin(mapKeys(ResourceAttributes)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ORDER BY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`ARRAY JOIN으로 맵을 행으로 펼치기`}),` — 각 키-값 쌍을 개별 행으로 변환하므로, 속성 목록을 만들거나 대시보드용 데이터를 구성할 때 유용합니다:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` value`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ARRAY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` JOIN`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` mapKeys(ResourceAttributes) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` mapValues(ResourceAttributes) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` value`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'cartservice'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LIMIT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`mapFilter로 맵 필터링하기`}),` — 각 스팬에서 Kubernetes 관련 속성만 추출합니다:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` mapFilter((k, v) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` k `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LIKE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'k8s.%'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, ResourceAttributes) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` k8s_attrs`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` mapContains(ResourceAttributes, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'k8s.pod.name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LIMIT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`오류 스팬과 해당 resource 컨텍스트 찾기`}),` — 일반 컬럼 필터와 맵 접근을 함께 사용합니다:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` Timestamp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpanName,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ResourceAttributes['host.name'] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` host,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ResourceAttributes['k8s.pod.name'] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pod,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpanAttributes['error.type'] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error_type,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpanAttributes['error.message'] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error_message`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` StatusCode `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'STATUS_CODE_ERROR'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})})]}),_jsxs(Step,{title:`-Map 조합자로 맵 전체에 걸쳐 집계하기`,id:`aggregate-across-maps-with-the--map-combinator`,children:[_jsxs(_components.p,{children:[`ClickHouse의 `,_jsx(_components.code,{children:`-Map`}),` 집계 조합자를 사용하면 `,_jsx(_components.code,{children:`Map`}),` 컬럼에 어떤 집계 함수든 적용해 각 키별로 독립적으로 집계할 수 있습니다. 결과 역시 `,_jsx(_components.code,{children:`Map`}),`이며, 각 키마다 하나의 항목과 해당 집계값이 포함됩니다. 이는 카운터나 게이지가 맵 값으로 저장되는 OTel 메트릭에서 특히 유용합니다.`]}),_jsxs(_components.p,{children:[`이를 보여주기 위해, 각 행이 HTTP 상태 코드별 개수를 `,_jsx(_components.code,{children:`Map(String, UInt64)`}),`로 기록하는 작은 메트릭 테이블을 생성합니다:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`CREATE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` TABLE`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` otel_http_status_counts`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` Timestamp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` DateTime`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName LowCardinality(String),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` StatusCounts Map(String, UInt64)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ENGINE `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` MergeTree()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ORDER BY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (ServiceName, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`Timestamp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`INSERT INTO`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_http_status_counts `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`VALUES`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2025-12-26 10:00:00'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cart-service'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`150`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'4xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'5xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2025-12-26 10:01:00'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cart-service'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'4xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'5xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2025-12-26 10:00:00'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'inventory-service'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`90`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'4xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2025-12-26 10:01:00'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'inventory-service'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`110`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'4xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'5xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2025-12-26 10:00:00'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'payment-service'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'5xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2025-12-26 10:01:00'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'payment-service'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'4xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'5xx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`이제 `,_jsx(_components.code,{children:`sumMap`}),`을 사용해 각 서비스의 상태 코드별 개수를 합산합니다:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sumMap(StatusCounts) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` total_by_status`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_http_status_counts`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`GROUP BY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`-Map`}),` 접미사는 모든 집계 함수와 함께 사용할 수 있으므로 `,_jsx(_components.code,{children:`minMap`}),`, `,_jsx(_components.code,{children:`maxMap`}),`, `,_jsx(_components.code,{children:`avgMap`}),`도 같은 방식으로 쉽게 사용할 수 있습니다:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` avgMap(StatusCounts) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` avg_by_status,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` maxMap(StatusCounts) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` peak_by_status`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_http_status_counts`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`GROUP BY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`다른 combinator와 함께 사용할 수도 있습니다. 예를 들어 `,_jsx(_components.code,{children:`sumMapIf`}),`를 사용하면 조건에 따라 집계할 수 있습니다. 여기서는 서비스에 이미 오류가 있었던 분 단위 윈도우만 합산합니다:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sumMapIf(StatusCounts, StatusCounts['5xx'] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` totals_in_error_windows`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_http_status_counts`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`GROUP BY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ServiceName;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`OTel에서 이것이 중요한 이유:`}),` OTel Collector가 분 단위 상태 코드별 집계를 ClickHouse에 기록할 때 `,_jsx(_components.code,{children:`sumMap`}),`을 사용하면 이를 단일 쿼리로 시간별 또는 일별 합계로 집계할 수 있습니다 — `,_jsx(_components.code,{children:`ARRAY JOIN`}),`도, 언피벗도, 전체 키 집합을 미리 파악하는 작업도 필요하지 않습니다. 어떤 키든 하나의 행에라도 나타나면 결과에 자동으로 포함됩니다.`]})]}),_jsxs(Step,{title:`자주 쿨리하는 키에 맞춰 최적화`,id:`optimise-for-frequently-queried-keys`,children:[_jsxs(_components.p,{children:[`같은 맵 키로 계속 필터링하는 경우 — `,_jsx(_components.code,{children:`host.name`}),`가 대표적인 예입니다 — 이를 구체화된 컬럼(Materialized Column)으로 추출할 수 있습니다. 이렇게 하면 쿼리할 때마다 맵 전체를 선형 스캔하지 않아도 됩니다:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ALTER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` TABLE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` ADD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` COLUMN HostName String`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` MATERIALIZED ResourceAttributes['host.name'];`})}),`\n`]})})}),_jsx(_components.p,{children:`기존 데이터에도 컬럼을 백필하세요:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ALTER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` TABLE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` otel_traces MATERIALIZE COLUMN HostName;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`이제 `,_jsx(_components.code,{children:`WHERE HostName = 'prod-cart-01'`}),`는 전체 맵 대신 해당 전용 단일 컬럼만 읽습니다. 이는 자주 쿼리하는 속성에 대해 OTel ClickHouse 스키마(schema)에서 권장되는 패턴입니다.`]})]})]}),`\n`,_jsx(`div`,{id:`key-takeaways`,children:_jsx(Heading,{level:`2`,id:`핵심-요약`,children:`핵심 요약`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`**`,_jsx(_components.code,{children:`Map(LowCardinality(String), String)`}),`**은 OTel 속성에 가장 자연스럽게 쓰이는 타입입니다. 다양한 키 집합을 유연하게 처리할 수 있고, `,_jsx(_components.code,{children:`LowCardinality`}),`는 키 저장 효율도 높여 줍니다.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`대괄호 구문`}),` (`,_jsx(_components.code,{children:`map['key']`}),`)은 값을 조회하는 가장 일반적인 방법이지만, 선형 스캔을 수행한다는 점을 기억해야 합니다. 키가 수십 개인 맵에는 괜찮지만, 수백 개라면 적합하지 않을 수 있습니다.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`materialized 컬럼`}),`은 이런 상황에서 유용한 해결책입니다. 맵 키가 자주 사용하는 필터 대상이 되면 이를 실제 컬럼으로 승격해 인덱스 기반의 열 지향 액세스를 활용하십시오.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`mapContains`}),`, `,_jsx(_components.code,{children:`mapKeys`}),`, `,_jsx(_components.code,{children:`mapValues`}),`, `,_jsx(_components.code,{children:`mapFilter`})]}),` 및 `,_jsx(_components.code,{children:`ARRAY JOIN`}),`은 SQL을 벗어나지 않고도 맵 데이터를 탐색하고 변환할 수 있는 강력한 도구를 제공합니다.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`-Map`}),` 집계 조합자`]}),` (`,_jsx(_components.code,{children:`sumMap`}),`, `,_jsx(_components.code,{children:`avgMap`}),`, `,_jsx(_components.code,{children:`maxMap`}),` 등)는 행 전반에서 각 키를 독립적으로 집계합니다. 키 집합을 미리 알 필요 없이 OTel 메트릭 카운터를 롤업하는 데 적합합니다. 다른 조합자와도 함께 조합할 수 있습니다(예: `,_jsx(_components.code,{children:`sumMapIf`}),`).`]}),`\n`]}),`\n`,_jsx(`div`,{id:`next-steps`,children:_jsx(Heading,{level:`2`,id:`다음-단계`,children:`다음 단계`})}),`\n`,_jsx(_components.p,{children:`다음 빠른 시작도 확인해 보세요:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/ko/get-started/quickstarts/create-your-first-mergetree-table`,children:`첫 번째 MergeTree 테이블 만들기`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/ko/get-started/quickstarts/create-your-first-materialized-view`,children:`첫 번째 materialized view 만들기`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/ko/get-started/quickstarts/home`,children:`시작하기에서 자주 발생하는 문제`})}),`\n`]}),`\n`,_jsx(_components.p,{children:`또는 참고 문서를 더 자세히 살펴보세요:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/ko/reference/data-types/map`,children:`맵 타입 참고`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/clickhouseexporter`,children:`ClickHouse OTel exporter`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/ko/reference/functions/aggregate-functions/combinators`,children:`집계 함수 조합자`})}),`\n`]}),`\n`,_jsx(Frame,{caption:`Check out the ClickHouse academy for on-demand and live training`,children:_jsx(`a`,{href:`https://learn.clickhouse.com/`,target:`_blank`,children:_jsx(`img`,{src:`https://mintcdn.com/private-7c7dfe99/EDr8ydtGBgFPOQea/images/academy.webp?fit=max\u0026auto=format\u0026n=EDr8ydtGBgFPOQea\u0026q=85\u0026s=27e92fc656183cc2f176211907a7aa49`,alt:`ClickHouse Academy — Master ClickHouse with expert-designed training for every skill level`,width:`560`,noZoom:true,\"data-og-width\":`1280`,\"data-og-height\":`720`,\"data-path\":`images/academy.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/private-7c7dfe99/EDr8ydtGBgFPOQea/images/academy.webp?w=280\u0026fit=max\u0026auto=format\u0026n=EDr8ydtGBgFPOQea\u0026q=85\u0026s=c6475339b9f0b1c411bbcf3bf6d64d34 280w, https://mintcdn.com/private-7c7dfe99/EDr8ydtGBgFPOQea/images/academy.webp?w=560\u0026fit=max\u0026auto=format\u0026n=EDr8ydtGBgFPOQea\u0026q=85\u0026s=ac29270203fad6406e1143c42d11612b 560w, https://mintcdn.com/private-7c7dfe99/EDr8ydtGBgFPOQea/images/academy.webp?w=840\u0026fit=max\u0026auto=format\u0026n=EDr8ydtGBgFPOQea\u0026q=85\u0026s=d35c1a71bc25e4dc029c08244178d09f 840w, https://mintcdn.com/private-7c7dfe99/EDr8ydtGBgFPOQea/images/academy.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=EDr8ydtGBgFPOQea\u0026q=85\u0026s=1d8a3a8917d2363513041143f10b588b 1100w, https://mintcdn.com/private-7c7dfe99/EDr8ydtGBgFPOQea/images/academy.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=EDr8ydtGBgFPOQea\u0026q=85\u0026s=d70048580aaf33d88c0d82f2c3be8c8c 1650w, https://mintcdn.com/private-7c7dfe99/EDr8ydtGBgFPOQea/images/academy.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=EDr8ydtGBgFPOQea\u0026q=85\u0026s=8f2864f7c389302c8a5ef25ba4454f60 2500w`})})}),`\n`,_jsx(`div`,{className:`mint-mt-8`,children:_jsxs(_components.a,{href:`/get-started/quickstarts/home`,onClick:e_1=>{e_1.preventDefault();window.location.href=(window.location.pathname.startsWith(`/docs`)?`/docs`:``)+`/get-started/quickstarts/home`},className:`mint-inline-flex mint-items-center mint-gap-1.5 mint-text-sm mint-text-gray-500 dark:mint-text-zinc-500 hover:mint-text-gray-900 dark:hover:mint-text-[#fdff75] mint-transition-colors mint-font-normal mint-no-underline`,children:[_jsxs(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`mint-shrink-0`,children:[_jsx(`path`,{d:`M19 12H5`}),_jsx(`path`,{d:`M12 19l-7-7 7-7`})]}),`All quickstarts`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{e_1,e_0,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"sidebarTitle":"ClickHouse에서 맵 타입 사용하기","searchable":true,"title":"ClickHouse에서 맵 타입 사용하기","useCases":["관측성"],"products":["OSS"],"description":"OTel 리소스 속성을 예시로, ClickHouse에서 동적 키-값 데이터를 저장, 쿼리, 집계하는 데 맵 타입을 사용하는 방법을 알아봅니다.","href":"/ko/get-started/quickstarts/working-with-the-map-type"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[771,918,""],[57244,57391,""]]},"mdxExtracts":{"tableOfContents":[{"title":"사전 요구 사항","slug":"사전-요구-사항","depth":2,"children":[]},{"title":"구축할 내용","slug":"구축할-내용","depth":2,"children":[{"title":"샘플 데이터 다운로드","slug":"download-the-sample-data","depth":3,"children":[]},{"title":"테이블을 생성하고 데이터를 로드합니다","slug":"create-the-table-and-load-the-data","depth":3,"children":[]},{"title":"데이터 쿼리","slug":"query-the-data","depth":3,"children":[]},{"title":"-Map 조합자로 맵 전체에 걸쳐 집계하기","slug":"aggregate-across-maps-with-the--map-combinator","depth":3,"children":[]},{"title":"자주 쿨리하는 키에 맞춰 최적화","slug":"optimise-for-frequently-queried-keys","depth":3,"children":[]}]},{"title":"핵심 요약","slug":"핵심-요약","depth":2,"children":[]},{"title":"다음 단계","slug":"다음-단계","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/private-7c7dfe99/a0ab956a7a3c7ff5/_site/customizations/ask-ai-button.js","/docs/_mintlify/custom/private-7c7dfe99/39eb0ad87fa3adc8/_site/customizations/clickhouse-sql-highlight.js","/docs/_mintlify/custom/private-7c7dfe99/f2f887f569696d41/_site/customizations/clickhouse-sql-lexer-wasm.js","/docs/_mintlify/custom/private-7c7dfe99/564839e4bb02c38e/_site/customizations/custom-footer.js","/docs/_mintlify/custom/private-7c7dfe99/240e3ba1823c3bae/_site/customizations/galaxy.js","/docs/_mintlify/custom/private-7c7dfe99/38fd3c627bad5620/_site/customizations/inkeep-init.js","/docs/_mintlify/custom/private-7c7dfe99/ad7415752a665282/_site/customizations/kapa-init.js","/docs/_mintlify/custom/private-7c7dfe99/c54d4536629b44db/_site/customizations/nav-icon-preload.js","/docs/_mintlify/custom/private-7c7dfe99/10c01e58e00a0bb5/_site/customizations/navbar-cta.js","/docs/_mintlify/custom/private-7c7dfe99/f75dab9369f45602/_site/customizations/raise-issue-link.js","/docs/_mintlify/custom/private-7c7dfe99/a97e716bfafb62fd/_site/customizations/scroll-reset.js","/docs/_mintlify/custom/private-7c7dfe99/bb66ab6ab59dfc53/_site/customizations/settings-legacy-redirect.js","/docs/_mintlify/custom/private-7c7dfe99/b734912855230cc2/_site/customizations/settings-legacy-routes/format-settings.js","/docs/_mintlify/custom/private-7c7dfe99/e07c37962b288c7e/_site/customizations/settings-legacy-routes/mergetree-settings.js","/docs/_mintlify/custom/private-7c7dfe99/2b8fcba9c043bce4/_site/customizations/settings-legacy-routes/server-settings.js","/docs/_mintlify/custom/private-7c7dfe99/20d8f577c04bd763/_site/customizations/settings-legacy-routes/session-settings.js","/docs/_mintlify/custom/private-7c7dfe99/3bd87f000900d6e2/_site/customizations/tab-nav.js","/docs/_mintlify/custom/private-7c7dfe99/5c7ce50607c95a70/_site/customizations/webterminal.js","/docs/_mintlify/custom/private-7c7dfe99/7b903fec76456ee0/_site/customizations/cloud-sidebar-ad.js","/docs/_mintlify/custom/private-7c7dfe99/346eac2572f9fb1d/_site/customizations/section-ticker.js"],"dynamicCss":".mint-mb-4 {\n margin-bottom: 1rem\n}\n.mint-mt-2 {\n margin-top: 0.5rem\n}\n.mint-mt-8 {\n margin-top: 2rem\n}\n.mint-flex {\n display: flex\n}\n.mint-inline-flex {\n display: inline-flex\n}\n.mint-shrink-0 {\n flex-shrink: 0\n}\n.mint-flex-wrap {\n flex-wrap: wrap\n}\n.mint-items-center {\n align-items: center\n}\n.mint-gap-1\\.5 {\n gap: 0.375rem\n}\n.mint-gap-2 {\n gap: 0.5rem\n}\n.mint-rounded-lg {\n border-radius: 0.5rem\n}\n.mint-border {\n border-width: 1px\n}\n.mint-border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity, 1))\n}\n.mint-bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1))\n}\n.mint-px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem\n}\n.mint-py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem\n}\n.mint-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem\n}\n.mint-font-medium {\n font-weight: 500\n}\n.mint-font-normal {\n font-weight: 400\n}\n.mint-text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity, 1))\n}\n.mint-text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1))\n}\n.mint-no-underline {\n text-decoration-line: none\n}\n.mint-transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n}\n.mint-transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n}\n.hover\\:mint-border-\\[\\#FAFF69\\]:hover {\n --tw-border-opacity: 1;\n border-color: rgb(250 255 105 / var(--tw-border-opacity, 1))\n}\n.hover\\:mint-text-gray-900:hover {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1))\n}\n.dark\\:mint-border-white\\/20:is(.dark *) {\n border-color: rgb(255 255 255 / 0.2)\n}\n.dark\\:mint-bg-\\[\\#1B1B18\\]:is(.dark *) {\n --tw-bg-opacity: 1;\n background-color: rgb(27 27 24 / var(--tw-bg-opacity, 1))\n}\n.dark\\:mint-text-white:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1))\n}\n.dark\\:mint-text-zinc-500:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(113 113 122 / var(--tw-text-opacity, 1))\n}\n.dark\\:hover\\:mint-text-\\[\\#fdff75\\]:hover:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(253 255 117 / var(--tw-text-opacity, 1))\n}","subdomain":"private-7c7dfe99","siteName":"ClickHouse Documentation","title":"ClickHouse에서 맵 타입 사용하기 - ClickHouse Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/get-started/quickstarts/working-with-the-map-type","matchLevel":1},"ar":{"href":"/ar/get-started/quickstarts/working-with-the-map-type","matchLevel":1},"es":{"href":"/es/get-started/quickstarts/working-with-the-map-type","matchLevel":1},"fr":{"href":"/fr/get-started/quickstarts/working-with-the-map-type","matchLevel":1},"ja":{"href":"/ja/get-started/quickstarts/working-with-the-map-type","matchLevel":1},"ko":{"href":"/ko/get-started/quickstarts/working-with-the-map-type","matchLevel":0},"pt-BR":{"href":"/pt-BR/get-started/quickstarts/working-with-the-map-type","matchLevel":1},"ru":{"href":"/ru/get-started/quickstarts/working-with-the-map-type","matchLevel":1},"zh":{"href":"/zh/get-started/quickstarts/working-with-the-map-type","matchLevel":1}}},"originalFileLocation":"ko/get-started/quickstarts/working-with-the-map-type.mdx","locale":"ko"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"OTel 리소스 속성을 예시로, ClickHouse에서 동적 키-값 데이터를 저장, 쿼리, 집계하는 데 맵 타입을 사용하는 방법을 알아봅니다.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ClickHouse Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/private-7c7dfe99/4UShO1VxIGDRhyfj/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/private-7c7dfe99/4UShO1VxIGDRhyfj/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/private-7c7dfe99/4UShO1VxIGDRhyfj/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/private-7c7dfe99/4UShO1VxIGDRhyfj/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/private-7c7dfe99/4UShO1VxIGDRhyfj/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/private-7c7dfe99/4UShO1VxIGDRhyfj/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/private-7c7dfe99/4UShO1VxIGDRhyfj/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/private-7c7dfe99/4UShO1VxIGDRhyfj/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/private-7c7dfe99/4UShO1VxIGDRhyfj/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"ClickHouse에서 맵 타입 사용하기 - ClickHouse Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"OTel 리소스 속성을 예시로, ClickHouse에서 동적 키-값 데이터를 저장, 쿼리, 집계하는 데 맵 타입을 사용하는 방법을 알아봅니다.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ClickHouse Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://private-7c7dfe99.mintlify.app/_mintlify/api/og/v2?division=%EA%B4%80%EC%B8%A1%EC%84%B1\u0026amp;title=ClickHouse%EC%97%90%EC%84%9C+%EB%A7%B5+%ED%83%80%EC%9E%85+%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0\u0026amp;description=OTel+%EB%A6%AC%EC%86%8C%EC%8A%A4+%EC%86%8D%EC%84%B1%EC%9D%84+%EC%98%88%EC%8B%9C%EB%A1%9C%2C+ClickHouse%EC%97%90%EC%84%9C+%EB%8F%99%EC%A0%81+%ED%82%A4-%EA%B0%92+%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%A5%BC+%EC%A0%80%EC%9E%A5%2C+%EC%BF%BC%EB%A6%AC%2C+%EC%A7%91%EA%B3%84%ED%95%98%EB%8A%94+%EB%8D%B0+%EB%A7%B5+%ED%83%80%EC%9E%85%EC%9D%84+%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94+%EB%B0%A9%EB%B2%95%EC%9D%84+%EC%95%8C%EC%95%84%EB%B4%85%EB%8B%88%EB%8B%A4.\u0026amp;theme=de5161c1b5df52f178b39943\u0026amp;signature=7ea16eaccc0bbc899a87f2f74986f5209a3dd227539c574f5b8b4fe1499c0212\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"ClickHouse에서 맵 타입 사용하기 - ClickHouse Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"OTel 리소스 속성을 예시로, ClickHouse에서 동적 키-값 데이터를 저장, 쿼리, 집계하는 데 맵 타입을 사용하는 방법을 알아봅니다.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://private-7c7dfe99.mintlify.app/_mintlify/api/og/v2?division=%EA%B4%80%EC%B8%A1%EC%84%B1\u0026amp;title=ClickHouse%EC%97%90%EC%84%9C+%EB%A7%B5+%ED%83%80%EC%9E%85+%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0\u0026amp;description=OTel+%EB%A6%AC%EC%86%8C%EC%8A%A4+%EC%86%8D%EC%84%B1%EC%9D%84+%EC%98%88%EC%8B%9C%EB%A1%9C%2C+ClickHouse%EC%97%90%EC%84%9C+%EB%8F%99%EC%A0%81+%ED%82%A4-%EA%B0%92+%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%A5%BC+%EC%A0%80%EC%9E%A5%2C+%EC%BF%BC%EB%A6%AC%2C+%EC%A7%91%EA%B3%84%ED%95%98%EB%8A%94+%EB%8D%B0+%EB%A7%B5+%ED%83%80%EC%9E%85%EC%9D%84+%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94+%EB%B0%A9%EB%B2%95%EC%9D%84+%EC%95%8C%EC%95%84%EB%B4%85%EB%8B%88%EB%8B%A4.\u0026amp;theme=de5161c1b5df52f178b39943\u0026amp;signature=7ea16eaccc0bbc899a87f2f74986f5209a3dd227539c574f5b8b4fe1499c0212\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/private-7c7dfe99/4UShO1VxIGDRhyfj/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ClickHouse Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1c1c1c\">\u003clink data-mint-head rel=\"canonical\" href=\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/ko/get-started/quickstarts/working-with-the-map-type.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://clickhouse.com/docs/get-started/quickstarts/working-with-the-map-type\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://clickhouse.com/docs/ar/get-started/quickstarts/working-with-the-map-type\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://clickhouse.com/docs/es/get-started/quickstarts/working-with-the-map-type\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://clickhouse.com/docs/fr/get-started/quickstarts/working-with-the-map-type\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://clickhouse.com/docs/ja/get-started/quickstarts/working-with-the-map-type\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://clickhouse.com/docs/pt-BR/get-started/quickstarts/working-with-the-map-type\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ru\" href=\"https://clickhouse.com/docs/ru/get-started/quickstarts/working-with-the-map-type\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://clickhouse.com/docs/zh/get-started/quickstarts/working-with-the-map-type\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://clickhouse.com/docs/get-started/quickstarts/working-with-the-map-type\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://clickhouse.com/#organization\",\"name\":\"ClickHouse Documentation\",\"url\":\"https://clickhouse.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/private-7c7dfe99/h2VHbIjccjT9ClSc/_site/logo/light.svg?fit=max\u0026auto=format\u0026n=h2VHbIjccjT9ClSc\u0026q=85\u0026s=b8a838f982def2b530a95016300bc7ec\"}},{\"@type\":\"WebSite\",\"@id\":\"https://clickhouse.com/docs#website\",\"name\":\"ClickHouse Documentation\",\"url\":\"https://clickhouse.com/docs\",\"publisher\":{\"@id\":\"https://clickhouse.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type#webpage\",\"url\":\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type\",\"name\":\"ClickHouse에서 맵 타입 사용하기\",\"description\":\"OTel 리소스 속성을 예시로, ClickHouse에서 동적 키-값 데이터를 저장, 쿼리, 집계하는 데 맵 타입을 사용하는 방법을 알아봅니다.\",\"isPartOf\":{\"@id\":\"https://clickhouse.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://clickhouse.com/docs/ko/get-started/index\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"빠른 시작\",\"item\":\"https://clickhouse.com/docs/ko/get-started/quickstarts/home\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"ClickHouse에서 맵 타입 사용하기\",\"item\":\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type#article\",\"headline\":\"ClickHouse에서 맵 타입 사용하기\",\"name\":\"ClickHouse에서 맵 타입 사용하기\",\"description\":\"OTel 리소스 속성을 예시로, ClickHouse에서 동적 키-값 데이터를 저장, 쿼리, 집계하는 데 맵 타입을 사용하는 방법을 알아봅니다.\",\"url\":\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type\",\"mainEntityOfPage\":{\"@id\":\"https://clickhouse.com/docs/ko/get-started/quickstarts/working-with-the-map-type#webpage\"},\"publisher\":{\"@id\":\"https://clickhouse.com/#organization\"},\"isPartOf\":{\"@id\":\"https://clickhouse.com/docs#website\"}}]}\u003c/script>","siteName":"ClickHouse Documentation","nav":{"global":null,"languages":[{"language":"en","pages":[{"title":"en","href":"/get-started/quickstarts/working-with-the-map-type"}]},{"language":"ar","pages":[{"title":"ar","href":"/ar/get-started/quickstarts/working-with-the-map-type"}]},{"language":"es","pages":[{"title":"es","href":"/es/get-started/quickstarts/working-with-the-map-type"}]},{"language":"fr","pages":[{"title":"fr","href":"/fr/get-started/quickstarts/working-with-the-map-type"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/get-started/quickstarts/working-with-the-map-type"}]},{"language":"ko","tabs":[{"tab":"홈","pages":[{"title":"홈","href":"/ko"}]},{"tab":"데이터베이스","menu":[{"item":"Get started","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-get-started.svg","pages":[{"group":"Get started","icon":"/images/menu-icon-lightning.svg","pages":[{"title":"ClickHouse 시작하기","sidebarTitle":"개요","href":"/ko/get-started"},{"group":"빠른 시작","expanded":false,"pages":[{"sidebarTitle":"빠른 시작 둘러보기","title":"빠른 시작 둘러보기","mode":"custom","href":"/ko/get-started/quickstarts/home"},{"group":"모든 사용 사례","expanded":false,"pages":[{"sidebarTitle":"Cloud 빠른 시작","title":"ClickHouse Cloud 빠른 시작","href":"/ko/get-started/setup/cloud"},{"sidebarTitle":"Cloud 연결 정보 확인","title":"Cloud 연결 정보 확인","href":"/ko/get-started/quickstarts/obtain-your-cloud-connection-details"},{"sidebarTitle":"clickhouse-client로 ClickHouse Cloud에 데이터 삽입","title":"clickhouse-client로 ClickHouse Cloud에 데이터 삽입","href":"/ko/get-started/quickstarts/insert-data-using-clickhouse-client"},{"sidebarTitle":"ClickHouse에서 테이블 생성","title":"ClickHouse에서 테이블 생성","href":"/ko/get-started/quickstarts/creating-tables"},{"sidebarTitle":"ClickHouse 데이터 선택","title":"ClickHouse 데이터 선택","href":"/ko/get-started/quickstarts/writing-queries"},{"sidebarTitle":"첫 번째 MergeTree 테이블 만들기","title":"첫 번째 MergeTree 테이블 만들기","href":"/ko/get-started/quickstarts/create-your-first-mergetree-table"}]},{"group":"실시간 분석","expanded":false,"pages":[{"sidebarTitle":"첫 materialized view 만들기","title":"첫 materialized view 만들기","href":"/ko/get-started/quickstarts/create-your-first-materialized-view"},{"sidebarTitle":"첫 번째 프로젝션 만들기","title":"첫 번째 프로젝션 만들기","href":"/ko/get-started/quickstarts/create-your-first-projection"}]},{"group":"데이터 웨어하우징","expanded":false,"pages":[{"sidebarTitle":"ClickHouse Cloud에서 Iceberg 카탈로그를 연결하는 방법","title":"ClickHouse Cloud에서 Iceberg 카탈로그를 연결하는 방법","href":"/ko/get-started/quickstarts/connect-your-iceberg-catalog"},{"sidebarTitle":"ClickHouse 데이터 업데이트 및 삭제","title":"ClickHouse 데이터 업데이트 및 삭제","description":"ClickHouse에서 업데이트 및 삭제 작업을 수행하는 방법을 설명합니다","href":"/ko/get-started/quickstarts/mutations"}]},{"group":"관측성","expanded":false,"pages":[{"sidebarTitle":"ClickHouse에서 맵 타입 사용하기","title":"ClickHouse에서 맵 타입 사용하기","href":"/ko/get-started/quickstarts/working-with-the-map-type"}]}]},{"group":"Introduction","expanded":true,"pages":[{"sidebarTitle":"ClickHouse란 무엇입니까?","description":"ClickHouse®는 온라인 분석 처리(OLAP)를 위한 컬럼 지향 SQL 데이터베이스 관리 시스템(DBMS)입니다. 오픈소스 소프트웨어와 클라우드 형태로 모두 제공됩니다.","title":"ClickHouse란 무엇입니까?","href":"/ko/get-started/about/intro"},{"sidebarTitle":"ClickHouse는 왜 이렇게 빠를까요?","title":"ClickHouse는 왜 이렇게 빠를까요?","href":"/ko/get-started/about/why-clickhouse-is-so-fast"},{"sidebarTitle":"ClickHouse가 특별한 이유","title":"ClickHouse의 고유한 특징","href":"/ko/get-started/about/distinctive-features"}]},{"group":"Use cases","expanded":true,"pages":[{"title":"사용 사례","sidebarTitle":"개요","href":"/ko/get-started/use-cases/overview"},{"title":"실시간 분석","sidebarTitle":"실시간 분석","href":"/ko/get-started/use-cases/real-time-analytics"},{"title":"관측성","sidebarTitle":"관측성","href":"/ko/get-started/use-cases/observability"},{"title":"데이터 웨어하우징","sidebarTitle":"데이터 웨어하우징","href":"/ko/get-started/use-cases/data-warehousing"},{"title":"에이전트형 분석","sidebarTitle":"에이전트형 분석","href":"/ko/get-started/use-cases/agentic-analytics"}]},{"sidebarTitle":"배포 모드","title":"배포 모드","href":"/ko/get-started/about/deployment-modes"}]},{"group":"Setup","icon":"/images/menu-icon-gear.svg","expanded":true,"pages":[{"sidebarTitle":"설치","title":"설치 안내","href":"/ko/get-started/setup/install"},{"sidebarTitle":"Cloud 빠른 시작","title":"ClickHouse Cloud 빠른 시작","href":"/ko/get-started/setup/cloud"},{"group":"Self-managed","expanded":true,"pages":[{"title":"자가 관리형 설치","sidebarTitle":"개요","href":"/ko/get-started/setup/self-managed/overview"},{"group":"Local development","pages":[{"sidebarTitle":"빠른 설치","title":"빠른 설치","href":"/ko/get-started/setup/self-managed/quick-install"},{"sidebarTitle":"clickhousectl (CLI)","title":"ClickHouse CLI로 설치","href":"/ko/get-started/setup/self-managed/clickhousectl"},{"sidebarTitle":"Docker","title":"Docker를 사용해 ClickHouse 설치","href":"/ko/get-started/setup/self-managed/docker"},{"sidebarTitle":"소스 및 CI 빌드","title":"소스 및 CI 빌드","href":"/ko/get-started/setup/self-managed/advanced"}]},{"group":"Production server","pages":[{"sidebarTitle":"Debian/Ubuntu","title":"Debian/Ubuntu에 ClickHouse 설치","href":"/ko/get-started/setup/self-managed/debian-ubuntu"},{"sidebarTitle":"Redhat/CentOS","title":"rpm 기반 Linux 배포판에 ClickHouse 설치","href":"/ko/get-started/setup/self-managed/redhat"},{"sidebarTitle":"NixOS","title":"NixOS에서 ClickHouse 설치","href":"/ko/get-started/setup/self-managed/nixos"},{"sidebarTitle":"기타 Linux","title":"tgz 아카이브를 사용해 ClickHouse 설치","href":"/ko/get-started/setup/self-managed/other-linux"}]}]}]},{"group":"Sample datasets","icon":"/images/menu-icon-database.svg","expanded":true,"pages":[{"sidebarTitle":"개요","title":"튜토리얼 및 예제 데이터셋","href":"/ko/get-started/sample-datasets/index"},{"sidebarTitle":"ClickHouse Playground","title":"ClickHouse Playground","href":"/ko/get-started/sample-datasets/playground"},{"group":"Benchmarks","pages":[{"sidebarTitle":"AMPLab 빅 데이터 벤치마크","title":"AMPLab Big Data Benchmark","href":"/ko/get-started/sample-datasets/amplab-benchmark"},{"sidebarTitle":"Brown University 벤치마크","title":"Brown University 벤치마크","href":"/ko/get-started/sample-datasets/brown-benchmark"},{"sidebarTitle":"Criteo 1TB 클릭 로그","title":"Criteo의 1TB 클릭 로그","href":"/ko/get-started/sample-datasets/criteo"},{"title":"Join Order Benchmark (JOB)","sidebarTitle":"JOB","href":"/ko/get-started/sample-datasets/job"},{"sidebarTitle":"Star Schema Benchmark","title":"Star Schema Benchmark (SSB, 2009)","href":"/ko/get-started/sample-datasets/star-schema"},{"title":"TPC-DS (2012)","sidebarTitle":"TPC-DS","href":"/ko/get-started/sample-datasets/tpcds"},{"title":"TPC-H (1999)","sidebarTitle":"TPC-H","href":"/ko/get-started/sample-datasets/tpch"}]},{"group":"Vector search \u0026 embeddings","pages":[{"sidebarTitle":"dbpedia 데이터셋","title":"dbpedia 데이터셋","href":"/ko/get-started/sample-datasets/dbpedia"},{"sidebarTitle":"Hacker News 벡터 검색 데이터셋","title":"Hacker News 벡터 검색 데이터셋","href":"/ko/get-started/sample-datasets/hacker-news-vector-search"},{"sidebarTitle":"Laion-400M 데이터셋","title":"Laion-400M 데이터셋","href":"/ko/get-started/sample-datasets/laion"},{"sidebarTitle":"LAION 5B 데이터셋","title":"LAION 5B 데이터셋","href":"/ko/get-started/sample-datasets/laion5b"}]},{"group":"Web \u0026 social analytics","pages":[{"sidebarTitle":"Amazon 고객 리뷰","title":"Amazon 고객 리뷰","href":"/ko/get-started/sample-datasets/amazon-reviews"},{"sidebarTitle":"익명화된 웹 분석","title":"익명화된 웹 분석","href":"/ko/get-started/sample-datasets/anon-web-analytics-metrica"},{"sidebarTitle":"GitHub 리포지토리","title":"GitHub 데이터로 ClickHouse에서 쿼리 작성하기","href":"/ko/get-started/sample-datasets/github"},{"sidebarTitle":"GitHub 이벤트","title":"GitHub 이벤트 데이터셋","href":"/ko/get-started/sample-datasets/github-events"},{"sidebarTitle":"Hacker News","title":"Hacker News 데이터셋","href":"/ko/get-started/sample-datasets/hacker-news"},{"sidebarTitle":"Stack Overflow","title":"ClickHouse로 Stack Overflow 데이터 분석","href":"/ko/get-started/sample-datasets/stackoverflow"},{"sidebarTitle":"YouTube 싫어요","title":"YouTube 싫어요 데이터셋","href":"/ko/get-started/sample-datasets/youtube-dislikes"}]},{"group":"Geo \u0026 location","pages":[{"sidebarTitle":"기지국","title":"기지국 데이터셋을 활용한 지리 공간 분석","href":"/ko/get-started/sample-datasets/cell-towers"},{"sidebarTitle":"Foursquare OS Places","title":"Foursquare OS Places 데이터셋","href":"/ko/get-started/sample-datasets/foursquare-os-places"},{"sidebarTitle":"뉴욕 택시 데이터","title":"뉴욕 택시 데이터셋을 활용한 지리공간 분석","href":"/ko/get-started/sample-datasets/nyc-taxi"}]},{"group":"Time series \u0026 sensors","pages":[{"sidebarTitle":"환경 센서 데이터","title":"환경 센서 데이터","href":"/ko/get-started/sample-datasets/environmental-sensors"},{"sidebarTitle":"NOAA Global Historical Climatology Network ","title":"NOAA Global Historical Climatology Network","href":"/ko/get-started/sample-datasets/noaa"},{"sidebarTitle":"대만 과거 기상 데이터셋","title":"대만 과거 기상 데이터셋","href":"/ko/get-started/sample-datasets/tw-weather"},{"sidebarTitle":"WikiStat","title":"WikiStat","href":"/ko/get-started/sample-datasets/wikistat"}]},{"group":"Public records \u0026 open data","pages":[{"sidebarTitle":"COVID-19 오픈 데이터","title":"COVID-19 오픈 데이터","href":"/ko/get-started/sample-datasets/covid19"},{"sidebarTitle":"New York Public Library \"What's on the Menu?\" 데이터셋","title":"New York Public Library \"What's on the Menu?\" 데이터셋","href":"/ko/get-started/sample-datasets/menus"},{"sidebarTitle":"NYPD 신고 데이터","title":"NYPD 신고 데이터","href":"/ko/get-started/sample-datasets/nypd-complaint-data"},{"sidebarTitle":"OnTime 항공편 데이터","title":"OnTime","href":"/ko/get-started/sample-datasets/ontime"},{"sidebarTitle":"영국 부동산 가격","title":"영국 부동산 가격 데이터 분석 쿼리","href":"/ko/get-started/sample-datasets/uk-price-paid"}]}]},{"group":"Migrate","icon":"/images/caret-double-right.svg","expanded":true,"pages":[{"sidebarTitle":"개요","title":"ClickHouse로 데이터 마이그레이션","href":"/ko/get-started/migrate/overview"},{"group":"PostgreSQL","pages":[{"title":"PostgreSQL과 ClickHouse 비교","sidebarTitle":"개요","href":"/ko/get-started/migrate/postgres/overview"},{"group":"Migration guide","pages":[{"title":"데이터 마이그레이션","sidebarTitle":"1부","href":"/ko/get-started/migrate/postgres/migration-guide/migration-guide-part1"},{"title":"PostgreSQL 쿼리 재작성하기","sidebarTitle":"2부","href":"/ko/get-started/migrate/postgres/migration-guide/migration-guide-part2"},{"title":"데이터 모델링 기법","sidebarTitle":"제3부","href":"/ko/get-started/migrate/postgres/migration-guide/migration-guide-part3"}]},{"title":"부록","href":"/ko/get-started/migrate/postgres/appendix"}]},{"group":"BigQuery","pages":[{"title":"ClickHouse Cloud와 BigQuery 비교","sidebarTitle":"개요","href":"/ko/get-started/migrate/bigquery/overview"},{"title":"BigQuery에서 ClickHouse Cloud로 마이그레이션","sidebarTitle":"마이그레이션 가이드","href":"/ko/get-started/migrate/bigquery/migrating-to-clickhouse-cloud"},{"sidebarTitle":"데이터 로드","title":"BigQuery에서 ClickHouse로 데이터 로드","href":"/ko/get-started/migrate/bigquery/loading-data"}]},{"group":"Snowflake","pages":[{"sidebarTitle":"개요","title":"Snowflake에서 ClickHouse로의 마이그레이션","href":"/ko/get-started/migrate/snowflake/overview"},{"sidebarTitle":"마이그레이션 가이드","title":"Snowflake에서 ClickHouse로 마이그레이션","href":"/ko/get-started/migrate/snowflake/migration-guide"},{"sidebarTitle":"SQL 번역 참고","title":"Snowflake에서 ClickHouse로 마이그레이션","href":"/ko/get-started/migrate/snowflake/sql-translation-reference"}]},{"group":"Elasticsearch","pages":[{"sidebarTitle":"개요","title":"Elasticsearch에서 ClickHouse로 마이그레이션","href":"/ko/get-started/migrate/elastic/overview"}]},{"group":"Redshift","pages":[{"sidebarTitle":"개요","title":"ClickHouse Cloud와 Amazon Redshift 비교","href":"/ko/get-started/migrate/redshift/overview"},{"sidebarTitle":"마이그레이션 가이드","title":"Amazon Redshift에서 ClickHouse로 이전하기 가이드","href":"/ko/get-started/migrate/redshift/migration-guide"},{"sidebarTitle":"SQL 변환 참고","title":"Amazon Redshift SQL 변환 가이드","href":"/ko/get-started/migrate/redshift/sql-translation-reference"}]},{"group":"OSS to Cloud","pages":[{"sidebarTitle":"remoteSecure 사용하기","title":"remoteSecure를 사용하여 자가 관리형 ClickHouse와 ClickHouse Cloud 간에 마이그레이션하기","href":"/ko/get-started/migrate/oss-to-cloud/clickhouse-to-cloud"},{"sidebarTitle":"BACKUP 및 RESTORE 사용","title":"Backup 명령을 사용한 자가 관리형 ClickHouse에서 ClickHouse Cloud로의 마이그레이션","href":"/ko/get-started/migrate/oss-to-cloud/oss-to-cloud-backup-restore"}]},{"group":"Other methods","pages":[{"sidebarTitle":"clickhouse-local 사용","title":"clickhouse-local을 사용해 ClickHouse로 마이그레이션하기","href":"/ko/get-started/migrate/other-methods/clickhouse-local-etl"},{"sidebarTitle":"타사 ETL 도구 사용","title":"타사 ETL 도구 사용","href":"/ko/get-started/migrate/other-methods/etl-tool-to-clickhouse"},{"title":"클라우드 객체 스토리지에서 ClickHouse Cloud로 데이터 이동","href":"/ko/get-started/migrate/other-methods/object-storage-to-clickhouse"}]}]}]},{"item":"개념","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-concepts.svg","pages":[{"title":"개념","href":"/ko/concepts"}]},{"item":"가이드","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-guides.svg","pages":[{"title":"가이드","href":"/ko/guides/clickhouse"}]},{"item":"참고","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-reference.svg","pages":[{"title":"참고","href":"/ko/reference/home"}]}]},{"tab":"솔루션","menu":[{"item":"ClickHouse Cloud","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/section-header.svg","href":"#"},{"item":"ClickHouse Cloud","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-clickhouse-cloud.svg","pages":[{"title":"ClickHouse Cloud","href":"/ko/products/cloud/getting-started/cloud-get-started"}]},{"item":"ClickHouse Managed Postgres","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-postgres.svg","pages":[{"title":"ClickHouse Managed Postgres","href":"/ko/products/managed-postgres/overview"}]},{"item":"Langfuse","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/logo-langfuse.svg","href":"https://langfuse.com/docs"},{"item":"오픈 소스","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/section-header.svg","href":"#"},{"item":"ClickStack","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-clickstack.svg","pages":[{"title":"ClickStack","href":"/ko/clickstack"}]},{"item":"에이전트형 데이터 스택","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-agentic-data-stack.svg","pages":[{"title":"에이전트형 데이터 스택","href":"/ko/products/agentic-data-stack/overview"}]},{"item":"chDB","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-chdb.svg","pages":[{"title":"chDB","href":"/ko/chdb"}]},{"item":"Kubernetes Operator","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-kubernetes-operator.svg","pages":[{"title":"Kubernetes Operator","href":"/ko/products/kubernetes-operator/overview"}]}],"pages":[{"title":"솔루션","href":"/ko/products/cloud/getting-started/cloud-get-started"}]},{"tab":"통합","menu":[{"item":"생태계","pages":[{"title":"생태계","href":"/ko/integrations/home"}]},{"item":"ClickPipes","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-clickpipes.svg","pages":[{"title":"ClickPipes","href":"/ko/integrations/clickpipes/home"}]},{"item":"언어 클라이언트","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-language-clients.svg","pages":[{"title":"언어 클라이언트","href":"/ko/integrations/language-clients"}]},{"item":"커넥터","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-connectors.svg","pages":[{"title":"커넥터","href":"/ko/integrations/connectors/data-sources"}]}],"pages":[{"title":"통합","href":"/ko/integrations/home"}]},{"tab":"자료","menu":[{"item":"지원 센터","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-support-center.svg","pages":[{"title":"지원 센터","href":"/ko/resources/support-center/home"}]},{"item":"개발 및 기여","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-contribute.svg","pages":[{"title":"개발 및 기여","href":"/ko/resources/develop-contribute/introduction/developer-instruction"}]},{"item":"변경 내역","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-changelogs.svg","dropdowns":[{"dropdown":"Cloud","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-clickhouse-cloud.svg","pages":[{"title":"Cloud","href":"/ko/resources/changelogs/cloud"}]},{"dropdown":"오픈 소스","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-server.svg","pages":[{"title":"오픈 소스","href":"/ko/resources/changelogs/oss/2026"}]}]},{"item":"소개","icon":"https://mintlify.s3.us-west-1.amazonaws.com/private-7c7dfe99/images/icons/icon-about.svg","pages":[{"title":"소개","href":"/ko/resources/about"}]}],"pages":[{"title":"자료","href":"/ko/resources/support-center/home"}]}]},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/pt-BR/get-started/quickstarts/working-with-the-map-type"}]},{"language":"ru","pages":[{"title":"ru","href":"/ru/get-started/quickstarts/working-with-the-map-type"}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/get-started/quickstarts/working-with-the-map-type"}]}]},"basePath":"","title":"ClickHouse에서 맵 타입 사용하기 - ClickHouse Documentation","buildId":"dpl_Acry4NrQAgjcikyFgVE2eJ7XQCAv","deploymentId":"dpl_Acry4NrQAgjcikyFgVE2eJ7XQCAv","dynamics":["07c022d89b"],"chunks":["Frame-D9VvKFqQ.js","DynamicMarkdown-BCpKo5ib.js"]}