Skip to main content
Skip to main content

Local File dictionary source

The local file source loads dictionary data from a file on the local filesystem. This is useful for small, static lookup tables that can be stored as flat files in formats such as TSV, CSV, or any other supported format.

Example of settings:

SOURCE(FILE(path './user_files/os.tsv' format 'TabSeparated'))

Setting fields:

SettingDescription
pathThe absolute path to the file.
formatThe file format. All the formats described in Formats are supported.

When a dictionary with source FILE is created via DDL command (CREATE DICTIONARY ...), the source file needs to be located in the user_files directory to prevent DB users from accessing arbitrary files on the ClickHouse node.

See Also