Syntax
deltaLake is an alias of deltaLakeS3 which is supported for compatibility.
Arguments
The arguments for this table function are the same as for thes3, azureBlobStorage, HDFS and file table functions respectively.
The format argument stands for the format of data files in the Delta lake table.
An optional extra_credentials parameter can be used to pass a role_arn for role-based access in ClickHouse Cloud. See Secure S3 for configuration steps.
Returned value
Returns a table with the specified structure for reading or writing data from/to the specified Delta Lake table.Examples
Reading data
Consider a table in S3 storage athttps://clickhouse-public-datasets.s3.amazonaws.com/delta_lake/hits/.
To read data from the table in ClickHouse, run:
Query
Response
Inserting data
Consider a table in S3 storage ats3://ch-docs-s3-bucket/people_10k/.
Delta Lake writes are a Beta feature disabled by default. Enable them with the following (allow_delta_lake_writes is available from version 26.7; on earlier versions use allow_experimental_delta_lake_writes):
Query
Query
Response
Query
Response
Virtual Columns
_path— Path to the file. Type:LowCardinality(String)._file— Name of the file. Type:LowCardinality(String)._size— Size of the file in bytes. Type:Nullable(UInt64). If the file size is unknown, the value isNULL._time— Last modified time of the file. Type:Nullable(DateTime). If the time is unknown, the value isNULL._etag— The etag of the file. Type:LowCardinality(String). If the etag is unknown, the value isNULL.