SQLite 表引擎
Not supported in ClickHouse Cloud
该引擎用于向 SQLite 导入数据或从 SQLite 导出数据,并支持在 ClickHouse 中直接查询 SQLite 表。
创建数据表
引擎参数
db_path— SQLite 数据库文件的路径。table— SQLite 数据库中表的名称。
支持的数据类型
当在表定义中显式指定 ClickHouse 列类型时,可以将 SQLite 的 TEXT 列解析为以下 ClickHouse 类型:
- Date, Date32
- DateTime, DateTime64
- UUID
- Enum8, Enum16
- Decimal32, Decimal64, Decimal128, Decimal256
- FixedString
- 所有整数类型(UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64)
- Float32, Float64
有关默认类型映射,请参阅 SQLite database engine。
使用示例
展示一个用于创建 SQLite 表的查询:
返回表中的数据:
另请参阅