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.
For Azure (deltaLakeAzure), extra_credentials takes client_id and tenant_id for workload identity and cannot be combined with account_name / account_key. The process must also have AZURE_FEDERATED_TOKEN_FILE set (AZURE_TENANT_ID / AZURE_CLIENT_ID if not passed explicitly; AZURE_AUTHORITY_HOST is optional). Workload identity uses the server’s own identity, so it is refused by default: enable allow_server_credentials_in_user_queries in the querying session or its settings profile.
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.