Dictionary Sources

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/sql-reference/statements/create/dictionary/sources/overview.md)

## Syntax[​](#dictionary-sources "Direct link to Syntax")

Tip

If you are using a dictionary with ClickHouse Cloud please use the DDL query option to create your dictionaries, and create your dictionary as user `default`.
Also, verify the list of supported dictionary sources in the [Cloud Compatibility guide](/docs/whats-new/cloud-compatibility).

A dictionary can be connected to ClickHouse from many different sources.
The source is configured in the `source` section for configuration file and using the `SOURCE` clause for DDL statement.

- DDL- Configuration file

```
CREATE DICTIONARY dict_name (...)
...
SOURCE(SOURCE_TYPE(param1 val1 ... paramN valN)) -- Source configuration
...
```

```
<clickhouse>
  <dictionary>
    ...
    <source>
      <source_type>
        <!-- Source configuration -->
      </source_type>
    </source>
    ...
  </dictionary>
  ...
</clickhouse>
```

  

## Supported dictionary sources[​](#supported-dictionary-sources "Direct link to Supported dictionary sources")

The following source types (`SOURCE_TYPE`/`source_type`) are available:

- [Local file](/docs/sql-reference/statements/create/dictionary/sources/local-file)
- [Executable File](/docs/sql-reference/statements/create/dictionary/sources/executable-file)
- [Executable Pool](/docs/sql-reference/statements/create/dictionary/sources/executable-pool)
- [HTTP(S)](/docs/sql-reference/statements/create/dictionary/sources/http)
- DBMS
  - [ODBC](/docs/sql-reference/statements/create/dictionary/sources/odbc)
  - [MySQL](/docs/sql-reference/statements/create/dictionary/sources/mysql)
  - [ClickHouse](/docs/sql-reference/statements/create/dictionary/sources/clickhouse)
  - [MongoDB](/docs/sql-reference/statements/create/dictionary/sources/mongodb)
  - [Redis](/docs/sql-reference/statements/create/dictionary/sources/redis)
  - [Cassandra](/docs/sql-reference/statements/create/dictionary/sources/cassandra)
  - [PostgreSQL](/docs/sql-reference/statements/create/dictionary/sources/postgresql)
  - [YTsaurus](/docs/sql-reference/statements/create/dictionary/sources/ytsaurus)
- [YAMLRegExpTree](/docs/sql-reference/statements/create/dictionary/sources/yamlregexptree)
- [Null](/docs/sql-reference/statements/create/dictionary/sources/null)

For source types [Local file](/docs/sql-reference/statements/create/dictionary/sources/local-file), [Executable file](/docs/sql-reference/statements/create/dictionary/sources/executable-file), [HTTP(s)](/docs/sql-reference/statements/create/dictionary/sources/http), [ClickHouse](/docs/sql-reference/statements/create/dictionary/sources/clickhouse)
optional settings are available:

- DDL- Configuration file

```
SOURCE(FILE(path './user_files/os.tsv' format 'TabSeparated'))
--highlight-next-line
SETTINGS(format_csv_allow_single_quotes = 0)
```

```
<source>
  <file>
    <path>/opt/dictionaries/os.tsv</path>
    <format>TabSeparated</format>
  </file>
  <settings>
#highlight-next-line
      <format_csv_allow_single_quotes>0</format_csv_allow_single_quotes>
  </settings>
</source>
```

- [Syntax](#dictionary-sources)- [Supported dictionary sources](#supported-dictionary-sources)

Was this page helpful?