curl --request GET \
--url http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changesimport requests
url = "http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"{\"protocol\": {\"minReaderVersion\": 1}}\n{\"metaData\": {\"id\": \"f8d5c169-3d01-4ca3-ad9e-7dc3355aedb2\",\"format\": {\"provider\": \"parquet\"},\"schemaString\": \"{\\\"type\\\":\\\"struct\\\",\\\"fields\\\":[{\\\"name\\\":\\\"eventTime\\\",\\\"type\\\":\\\"timestamp\\\",\\\"nullable\\\":true,\\\"metadata\\\":{}},{\\\"name\\\":\\\"date\\\",\\\"type\\\":\\\"date\\\",\\\"nullable\\\":true,\\\"metadata\\\":{}}]}\",\"partitionColumns\": [\"date\"],\"configuration\": {\"enableChangeDataFeed\": \"true\"}}}{\"add\": {\"url\": \"https://<s3-bucket-name>.s3.us-west-2.amazonaws.com/delta-exchange-test/table_cdf/date%3D2021-04-28/part-00000-8b0086f2-7b27-4935-ac5a-8ed6215a6640.c000.snappy.parquet?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210501T010516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=<aws-access-key-id>%2F20210501%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=<signature>\",\"id\": \"8b0086f2-7b27-4935-ac5a-8ed6215a6640\",\"partitionValues\": {\"date\": \"2021-04-28\"},\"size\":573,\"stats\": \"{\\\"numRecords\\\":1,\\\"minValues\\\":{\\\"eventTime\\\":\\\"2021-04-28T23:33:57.955Z\\\"},\\\"maxValues\\\":{\\\"eventTime\\\":\\\"2021-04-28T23:33:57.955Z\\\"},\\\"nullCount\\\":{\\\"eventTime\\\":0}}\",\"timestamp\": 1652140000000,\"version\": 0}}\n{\"cdf\": {\"url\": \"https://<s3-bucket-name>.s3.us-west-2.amazonaws.com/delta-exchange-test/table_cdf/_change_data/date%3D2021-04-28/part-00000-591723a8-6a27-4240-a90e-57426f4736d2.c000.snappy.parquet?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210501T010516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=899&X-Amz-Credential=<aws-access-key-id>%2F20210501%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=<signature>\",\"id\": \"591723a8-6a27-4240-a90e-57426f4736d2\",\"partitionValues\": {\"date\": \"2021-04-28\"},\"size\": 689,\"timestamp\": 1652141000000,\"version\": 1}}\n{\"remove\": {\"url\": \"https://<s3-bucket-name>.s3.us-west-2.amazonaws.com/delta-exchange-test/table_cdf/date%3D2021-04-28/part-00000-8b0086f2-7b27-4935-ac5a-8ed6215a6640.c000.snappy.parquet?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210501T010516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=<aws-access-key-id>%2F20210501%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=<signature>\",\"id\": \"8b0086f2-7b27-4935-ac5a-8ed6215a6640\",\"partitionValues\": {\"date\": \"2021-04-28\"},\"size\": 573,\"timestamp\": 1652142000000,\"version\": 2}}\n"{
"errorCode": "<string>",
"message": "<string>"
}{
"errorCode": "<string>",
"message": "<string>"
}{
"errorCode": "<string>",
"message": "<string>"
}{
"errorCode": "<string>",
"message": "<string>"
}{
"errorCode": "<string>",
"message": "<string>"
}Read Change Data Feed from a Table
This is the API for clients to read change data feed from a table. The API supports a start parameter and and an end parameter. The start/end parameter can either be a version or a timestamp. The start parameter must be provided. If the end parameter is not provided, the API will use the latest table version for it. The parameter range is inclusive in the query. You can specify a version as a Long or a timestamp as a string in the Timestamp Format. The change data feed represents row-level changes between versions of a Delta table. It records change data for UPDATE, DELETE, and MERGE operations. If you leverage the connectors provided by this library to read change data feed, it results in three metadata columns that identify the type of change event, in addition to the data columns: _change_type (type: String): There are four values: insert, update_preimage, update_postimage, delete. preimage is the value before the udpate, postimage is the value after the update. _commit_version (type: Long): The table version containing the change. _commit_timestamp (type: Long): The unix timestamp associated when the commit of the change was created, in milliseconds.
curl --request GET \
--url http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changesimport requests
url = "http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/api/v1/shares/{share}/schemas/{schema}/tables/{table}/changes")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"{\"protocol\": {\"minReaderVersion\": 1}}\n{\"metaData\": {\"id\": \"f8d5c169-3d01-4ca3-ad9e-7dc3355aedb2\",\"format\": {\"provider\": \"parquet\"},\"schemaString\": \"{\\\"type\\\":\\\"struct\\\",\\\"fields\\\":[{\\\"name\\\":\\\"eventTime\\\",\\\"type\\\":\\\"timestamp\\\",\\\"nullable\\\":true,\\\"metadata\\\":{}},{\\\"name\\\":\\\"date\\\",\\\"type\\\":\\\"date\\\",\\\"nullable\\\":true,\\\"metadata\\\":{}}]}\",\"partitionColumns\": [\"date\"],\"configuration\": {\"enableChangeDataFeed\": \"true\"}}}{\"add\": {\"url\": \"https://<s3-bucket-name>.s3.us-west-2.amazonaws.com/delta-exchange-test/table_cdf/date%3D2021-04-28/part-00000-8b0086f2-7b27-4935-ac5a-8ed6215a6640.c000.snappy.parquet?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210501T010516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=<aws-access-key-id>%2F20210501%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=<signature>\",\"id\": \"8b0086f2-7b27-4935-ac5a-8ed6215a6640\",\"partitionValues\": {\"date\": \"2021-04-28\"},\"size\":573,\"stats\": \"{\\\"numRecords\\\":1,\\\"minValues\\\":{\\\"eventTime\\\":\\\"2021-04-28T23:33:57.955Z\\\"},\\\"maxValues\\\":{\\\"eventTime\\\":\\\"2021-04-28T23:33:57.955Z\\\"},\\\"nullCount\\\":{\\\"eventTime\\\":0}}\",\"timestamp\": 1652140000000,\"version\": 0}}\n{\"cdf\": {\"url\": \"https://<s3-bucket-name>.s3.us-west-2.amazonaws.com/delta-exchange-test/table_cdf/_change_data/date%3D2021-04-28/part-00000-591723a8-6a27-4240-a90e-57426f4736d2.c000.snappy.parquet?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210501T010516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=899&X-Amz-Credential=<aws-access-key-id>%2F20210501%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=<signature>\",\"id\": \"591723a8-6a27-4240-a90e-57426f4736d2\",\"partitionValues\": {\"date\": \"2021-04-28\"},\"size\": 689,\"timestamp\": 1652141000000,\"version\": 1}}\n{\"remove\": {\"url\": \"https://<s3-bucket-name>.s3.us-west-2.amazonaws.com/delta-exchange-test/table_cdf/date%3D2021-04-28/part-00000-8b0086f2-7b27-4935-ac5a-8ed6215a6640.c000.snappy.parquet?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210501T010516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=<aws-access-key-id>%2F20210501%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=<signature>\",\"id\": \"8b0086f2-7b27-4935-ac5a-8ed6215a6640\",\"partitionValues\": {\"date\": \"2021-04-28\"},\"size\": 573,\"timestamp\": 1652142000000,\"version\": 2}}\n"{
"errorCode": "<string>",
"message": "<string>"
}{
"errorCode": "<string>",
"message": "<string>"
}{
"errorCode": "<string>",
"message": "<string>"
}{
"errorCode": "<string>",
"message": "<string>"
}{
"errorCode": "<string>",
"message": "<string>"
}Path Parameters
Query Parameters
Response
This is the API for clients to read change data feed from a table.
The response is of type string.
"{\"protocol\": {\"minReaderVersion\": 1}}\n{\"metaData\": {\"id\": \"f8d5c169-3d01-4ca3-ad9e-7dc3355aedb2\",\"format\": {\"provider\": \"parquet\"},\"schemaString\": \"{\\\"type\\\":\\\"struct\\\",\\\"fields\\\":[{\\\"name\\\":\\\"eventTime\\\",\\\"type\\\":\\\"timestamp\\\",\\\"nullable\\\":true,\\\"metadata\\\":{}},{\\\"name\\\":\\\"date\\\",\\\"type\\\":\\\"date\\\",\\\"nullable\\\":true,\\\"metadata\\\":{}}]}\",\"partitionColumns\": [\"date\"],\"configuration\": {\"enableChangeDataFeed\": \"true\"}}}{\"add\": {\"url\": \"https://<s3-bucket-name>.s3.us-west-2.amazonaws.com/delta-exchange-test/table_cdf/date%3D2021-04-28/part-00000-8b0086f2-7b27-4935-ac5a-8ed6215a6640.c000.snappy.parquet?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210501T010516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=<aws-access-key-id>%2F20210501%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=<signature>\",\"id\": \"8b0086f2-7b27-4935-ac5a-8ed6215a6640\",\"partitionValues\": {\"date\": \"2021-04-28\"},\"size\":573,\"stats\": \"{\\\"numRecords\\\":1,\\\"minValues\\\":{\\\"eventTime\\\":\\\"2021-04-28T23:33:57.955Z\\\"},\\\"maxValues\\\":{\\\"eventTime\\\":\\\"2021-04-28T23:33:57.955Z\\\"},\\\"nullCount\\\":{\\\"eventTime\\\":0}}\",\"timestamp\": 1652140000000,\"version\": 0}}\n{\"cdf\": {\"url\": \"https://<s3-bucket-name>.s3.us-west-2.amazonaws.com/delta-exchange-test/table_cdf/_change_data/date%3D2021-04-28/part-00000-591723a8-6a27-4240-a90e-57426f4736d2.c000.snappy.parquet?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210501T010516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=899&X-Amz-Credential=<aws-access-key-id>%2F20210501%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=<signature>\",\"id\": \"591723a8-6a27-4240-a90e-57426f4736d2\",\"partitionValues\": {\"date\": \"2021-04-28\"},\"size\": 689,\"timestamp\": 1652141000000,\"version\": 1}}\n{\"remove\": {\"url\": \"https://<s3-bucket-name>.s3.us-west-2.amazonaws.com/delta-exchange-test/table_cdf/date%3D2021-04-28/part-00000-8b0086f2-7b27-4935-ac5a-8ed6215a6640.c000.snappy.parquet?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210501T010516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=<aws-access-key-id>%2F20210501%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=<signature>\",\"id\": \"8b0086f2-7b27-4935-ac5a-8ed6215a6640\",\"partitionValues\": {\"date\": \"2021-04-28\"},\"size\": 573,\"timestamp\": 1652142000000,\"version\": 2}}\n"