Skip to main content
Allows to connect to SQLite database and perform INSERT and SELECT queries to exchange data between ClickHouse and SQLite.

Creating a database

Engine Parameters
  • db_path — Path to a file with SQLite database.

Data types support

The table below shows the default type mapping when ClickHouse automatically infers schema from SQLite:
SQLiteClickHouse
INTEGERInt32
REALFloat32
TEXTString
TEXTUUID
BLOBString
When you explicitly define a table with specific ClickHouse types using the SQLite table engine, the following ClickHouse types can be parsed from SQLite TEXT columns: SQLite has dynamic typing, and its type access functions perform automatic type coercion. For example, reading a TEXT column as an integer will return 0 if the text cannot be parsed as a number. This means that if a ClickHouse table is defined with a different type than the underlying SQLite column, values may be silently coerced rather than causing an error.

Specifics and recommendations

SQLite stores the entire database (definitions, tables, indices, and the data itself) as a single cross-platform file on a host machine. During writing SQLite locks the entire database file, therefore write operations are performed sequentially. Read operations can be multi-tasked. SQLite does not require service management (such as startup scripts) or access control based on GRANT and passwords. Access control is handled by means of file-system permissions given to the database file itself.

Usage example

Database in ClickHouse, connected to the SQLite:
Shows the tables:
Inserting data into SQLite table from ClickHouse table:
Last modified on July 2, 2026