Overview
Change Data Feed provides three metadata columns in addition to table data:_change_type(String): The type of change -insert,update_preimage,update_postimage, ordelete_commit_version(Long): The table version containing the change_commit_timestamp(Long): Unix timestamp (milliseconds) when the change was committed
Request
string
required
GET
string
required
{prefix}/shares/{share}/schemas/{schema}/tables/{table}/changesHeaders
string
required
Bearer token for authentication
string
URL Parameters
The share name to query. This parameter is case-insensitive.
string
required
The schema name to query. This parameter is case-insensitive.
string
required
The table name to query. This parameter is case-insensitive.
Query Parameters
At least one of
startingVersion or startingTimestamp must be provided.Long
The starting version of the query (inclusive). Either this or
startingTimestamp is required.String
The starting timestamp in ISO8601 format (UTC timezone), e.g.,
2022-01-01T00:00:00Z. Will be converted to a version created at or after this timestamp.Long
The ending version of the query (inclusive). If not provided, uses the latest table version.
String
The ending timestamp in ISO8601 format (UTC timezone). Will be converted to a version created at or before this timestamp.
Boolean
If true, return historical metadata seen in the delta log. Useful for streaming clients to check schema compatibility.Default:
falseResponse
Headers
string
Long
The starting version of files in the response
Response Body
The response is newline-delimited JSON (NDJSON) with the following structure:object
required
First line: Protocol version information
object
required
Second line: Table metadata (current and optionally historical if
includeHistoricalMetadata=true)object
Change data: File additions
object
Change data feed files (changes stored in
_change_data directory)object
Change data: File removals
Example Request
Example Response
Using Timestamps
Error Responses
Change Types
The
_change_type column in CDF files indicates the type of operation:- insert: New row added to the table
- update_preimage: Row values before an update
- update_postimage: Row values after an update
- delete: Row removed from the table
Change Data Feed must be enabled on the table (
enableChangeDataFeed = true in table configuration) for this API to work.