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

> `Dictionary` 엔진은 딕셔너리 데이터를 ClickHouse 테이블 형태로 표시합니다.

# 딕셔너리 테이블 엔진

`Dictionary` 엔진은 [딕셔너리](/ko/reference/statements/create/dictionary) 데이터를 ClickHouse 테이블 형태로 표시합니다.

<div id="example">
  ## 예시
</div>

예를 들어, 다음과 같이 구성된 `products` 딕셔너리를 살펴보겠습니다.

```xml theme={null}
<dictionaries>
    <dictionary>
        <name>products</name>
        <source>
            <odbc>
                <table>products</table>
                <connection_string>DSN=some-db-server</connection_string>
            </odbc>
        </source>
        <lifetime>
            <min>300</min>
            <max>360</max>
        </lifetime>
        <layout>
            <flat/>
        </layout>
        <structure>
            <id>
                <name>product_id</name>
            </id>
            <attribute>
                <name>title</name>
                <type>String</type>
                <null_value></null_value>
            </attribute>
        </structure>
    </dictionary>
</dictionaries>
```

딕셔너리 데이터를 조회하세요:

```sql theme={null}
SELECT
    name,
    type,
    key,
    attribute.names,
    attribute.types,
    bytes_allocated,
    element_count,
    source
FROM system.dictionaries
WHERE name = 'products'
```

```text theme={null}
┌─name─────┬─type─┬─key────┬─attribute.names─┬─attribute.types─┬─bytes_allocated─┬─element_count─┬─source──────────┐
│ products │ Flat │ UInt64 │ ['title']       │ ['String']      │        23065376 │        175032 │ ODBC: .products │
└──────────┴──────┴────────┴─────────────────┴─────────────────┴─────────────────┴───────────────┴─────────────────┘
```

[dictGet\*](/ko/reference/functions/regular-functions/ext-dict-functions) 함수를 사용하면 이 형식으로 딕셔너리 데이터를 가져올 수 있습니다.

원시 데이터를 가져와야 하거나 `JOIN`을 수행해야 할 때는 이 뷰가 유용하지 않습니다. 이런 경우에는 딕셔너리 데이터를 테이블로 표시하는 `Dictionary` 엔진을 사용할 수 있습니다.

구문:

```sql theme={null}
CREATE TABLE %table_name% (%fields%) engine = Dictionary(%dictionary_name%)`
```

사용 예시:

```sql theme={null}
CREATE TABLE products (product_id UInt64, title String) ENGINE = Dictionary(products);
```

좋습니다.

테이블에 어떤 데이터가 들어 있는지 살펴보겠습니다.

```sql theme={null}
SELECT * FROM products LIMIT 1;
```

```text theme={null}
┌────product_id─┬─title───────────┐
│        152689 │ Some item       │
└───────────────┴─────────────────┘
```

**관련 항목**

* [딕셔너리 함수](/ko/reference/functions/table-functions/dictionary)
