Data Diffs
List data diffs
All fields support multiple items, using just comma delimiter Date fields also support ranges using the following syntax:
<DATETIME= before DATETIME>DATETIME= after DATETIMEDATETIME= between DATETIME and DATETIME + 1 MINUTEDATE= start of that DATE until DATE + 1 DAYDATETIME1<<DATETIME2= between DATETIME1 and DATETIME2DATE1<<DATE2= between DATE1 and DATE2
GET
/
api
/
v1
/
datadiffs
List data diffs
curl --request GET \
--url https://app.datafold.com/api/v1/datadiffs \
--header 'Authorization: <api-key>'import requests
url = "https://app.datafold.com/api/v1/datadiffs"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.datafold.com/api/v1/datadiffs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.datafold.com/api/v1/datadiffs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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 := "https://app.datafold.com/api/v1/datadiffs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.datafold.com/api/v1/datadiffs")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.datafold.com/api/v1/datadiffs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"page": 123,
"page_size": 123,
"results": [
{
"data_source1_id": 123,
"data_source2_id": 123,
"pk_columns": [
"<string>"
],
"affected_columns": [
"<string>"
],
"archived": false,
"bisection_factor": 123,
"bisection_threshold": 123,
"ci_base_branch": "<string>",
"ci_pr_branch": "<string>",
"ci_pr_num": 123,
"ci_pr_sha": "<string>",
"ci_pr_url": "<string>",
"ci_pr_user_display_name": "<string>",
"ci_pr_user_email": "<string>",
"ci_pr_user_id": "<string>",
"ci_pr_username": "<string>",
"ci_run_id": 123,
"ci_sha_url": "<string>",
"column_mapping": [
[
"<string>",
"<string>"
]
],
"column_rules": [
{
"equal_if": "<string>",
"column": "<string>"
}
],
"columns_to_compare": [
"<string>"
],
"compare_duplicates": true,
"created_at": "2023-11-07T05:31:56Z",
"data_app_metadata": {
"data_app_id": 123,
"data_app_model_type": "<string>",
"meta_data": {},
"data_app_model1_id": "<string>",
"data_app_model1_name": "<string>",
"data_app_model2_id": "<string>",
"data_app_model2_name": "<string>"
},
"data_app_type": "<string>",
"data_source1_session_parameters": {},
"data_source2_session_parameters": {},
"datetime_tolerance": 123,
"diff_stats": {
"version": "<string>",
"diff_duplicate_pks": 123,
"diff_null_pks": 123,
"diff_pks": 123,
"diff_rows": 123,
"diff_rows_count": 123,
"diff_rows_number": 123,
"diff_schema": 123,
"diff_values": 123,
"errors": 123,
"match_ratio": 123,
"rows_added": 123,
"rows_removed": 123,
"sampled": true,
"table_a_row_count": 123,
"table_b_row_count": 123
},
"diff_tolerance": 123,
"diff_tolerances_per_column": [
{
"column_name": "<string>",
"tolerance_value": 123
}
],
"done": false,
"download_limit": 123,
"exclude_columns": [
"<string>"
],
"execute_as_user": true,
"file1": "<string>",
"file1_options": {
"delimiter": "<string>",
"file_type": "csv",
"skip_head_rows": 123,
"skip_tail_rows": 123
},
"file2": "<string>",
"file2_options": {
"delimiter": "<string>",
"file_type": "csv",
"skip_head_rows": 123,
"skip_tail_rows": 123
},
"filter1": "<string>",
"filter2": "<string>",
"finished_at": "2023-11-07T05:31:56Z",
"id": 123,
"include_columns": [
"<string>"
],
"infer_pk": false,
"infer_pk_avoid_names": [
"<string>"
],
"infer_pk_avoid_types": [
"<string>"
],
"materialization_destination_id": 123,
"materialize_dataset1": true,
"materialize_dataset2": true,
"materialize_without_sampling": false,
"monitor_error": {
"error_type": "<string>",
"error_value": "<string>"
},
"monitor_id": 123,
"per_column_diff_limit": 123,
"purged": false,
"query1": "<string>",
"query2": "<string>",
"result_revisions": {},
"result_statuses": {},
"run_profiles": true,
"runtime": 123,
"sampling_confidence": 123,
"sampling_max_rows": 123,
"sampling_ratio": 123,
"sampling_threshold": 123,
"sampling_tolerance": 123,
"share_token": "<string>",
"share_url": "<string>",
"sort_array_columns": true,
"table1": [
"<string>"
],
"table2": [
"<string>"
],
"table_modifiers": [],
"tags": [
"<string>"
],
"temp_schema_override": [
"<string>"
],
"time_column": "<string>",
"time_interval_end": "2023-11-07T05:31:56Z",
"time_interval_start": "2023-11-07T05:31:56Z",
"time_travel_point1": 123,
"time_travel_point2": 123,
"updated_at": "2023-11-07T05:31:56Z",
"user_id": 123
}
],
"total_pages": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Use the 'Authorization' header with the format 'Key '
Query Parameters
Available options:
asc, desc Available options:
id, user_id, user_name, data_source1_id, data_source2_id, table1, table2, query1, query2, pk_columns, include_columns, exclude_columns, time_column, time_aggregate, filter1, filter2, done, time_interval_start, time_interval_end, created_at, updated_at, diff_stats_pks, diff_stats_rows, diff_stats_values, stats.match_ratio, tags, source, status, bisection_factor, bisection_threshold, ci_type, ci_run_id, pr_user_id, pr_username, pr_user_email, pr_user_display_name, pr_num, pr_branch, monitor_id, data_app_type, data_app_data_source_id, data_app_model1_id, data_app_model2_id, data_app_model1_name, data_app_model2_name, user_ref, result, archived, purged, kind Previous
Create a data diffLaunches a new data diff to compare two datasets (tables or queries).
A data diff identifies differences between two datasets by comparing:
- Row-level changes (added, removed, modified rows)
- Schema differences
- Column-level statistics
The diff runs asynchronously. Use the returned diff ID to poll for status and retrieve results.
Next
⌘I
List data diffs
curl --request GET \
--url https://app.datafold.com/api/v1/datadiffs \
--header 'Authorization: <api-key>'import requests
url = "https://app.datafold.com/api/v1/datadiffs"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.datafold.com/api/v1/datadiffs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.datafold.com/api/v1/datadiffs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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 := "https://app.datafold.com/api/v1/datadiffs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.datafold.com/api/v1/datadiffs")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.datafold.com/api/v1/datadiffs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"page": 123,
"page_size": 123,
"results": [
{
"data_source1_id": 123,
"data_source2_id": 123,
"pk_columns": [
"<string>"
],
"affected_columns": [
"<string>"
],
"archived": false,
"bisection_factor": 123,
"bisection_threshold": 123,
"ci_base_branch": "<string>",
"ci_pr_branch": "<string>",
"ci_pr_num": 123,
"ci_pr_sha": "<string>",
"ci_pr_url": "<string>",
"ci_pr_user_display_name": "<string>",
"ci_pr_user_email": "<string>",
"ci_pr_user_id": "<string>",
"ci_pr_username": "<string>",
"ci_run_id": 123,
"ci_sha_url": "<string>",
"column_mapping": [
[
"<string>",
"<string>"
]
],
"column_rules": [
{
"equal_if": "<string>",
"column": "<string>"
}
],
"columns_to_compare": [
"<string>"
],
"compare_duplicates": true,
"created_at": "2023-11-07T05:31:56Z",
"data_app_metadata": {
"data_app_id": 123,
"data_app_model_type": "<string>",
"meta_data": {},
"data_app_model1_id": "<string>",
"data_app_model1_name": "<string>",
"data_app_model2_id": "<string>",
"data_app_model2_name": "<string>"
},
"data_app_type": "<string>",
"data_source1_session_parameters": {},
"data_source2_session_parameters": {},
"datetime_tolerance": 123,
"diff_stats": {
"version": "<string>",
"diff_duplicate_pks": 123,
"diff_null_pks": 123,
"diff_pks": 123,
"diff_rows": 123,
"diff_rows_count": 123,
"diff_rows_number": 123,
"diff_schema": 123,
"diff_values": 123,
"errors": 123,
"match_ratio": 123,
"rows_added": 123,
"rows_removed": 123,
"sampled": true,
"table_a_row_count": 123,
"table_b_row_count": 123
},
"diff_tolerance": 123,
"diff_tolerances_per_column": [
{
"column_name": "<string>",
"tolerance_value": 123
}
],
"done": false,
"download_limit": 123,
"exclude_columns": [
"<string>"
],
"execute_as_user": true,
"file1": "<string>",
"file1_options": {
"delimiter": "<string>",
"file_type": "csv",
"skip_head_rows": 123,
"skip_tail_rows": 123
},
"file2": "<string>",
"file2_options": {
"delimiter": "<string>",
"file_type": "csv",
"skip_head_rows": 123,
"skip_tail_rows": 123
},
"filter1": "<string>",
"filter2": "<string>",
"finished_at": "2023-11-07T05:31:56Z",
"id": 123,
"include_columns": [
"<string>"
],
"infer_pk": false,
"infer_pk_avoid_names": [
"<string>"
],
"infer_pk_avoid_types": [
"<string>"
],
"materialization_destination_id": 123,
"materialize_dataset1": true,
"materialize_dataset2": true,
"materialize_without_sampling": false,
"monitor_error": {
"error_type": "<string>",
"error_value": "<string>"
},
"monitor_id": 123,
"per_column_diff_limit": 123,
"purged": false,
"query1": "<string>",
"query2": "<string>",
"result_revisions": {},
"result_statuses": {},
"run_profiles": true,
"runtime": 123,
"sampling_confidence": 123,
"sampling_max_rows": 123,
"sampling_ratio": 123,
"sampling_threshold": 123,
"sampling_tolerance": 123,
"share_token": "<string>",
"share_url": "<string>",
"sort_array_columns": true,
"table1": [
"<string>"
],
"table2": [
"<string>"
],
"table_modifiers": [],
"tags": [
"<string>"
],
"temp_schema_override": [
"<string>"
],
"time_column": "<string>",
"time_interval_end": "2023-11-07T05:31:56Z",
"time_interval_start": "2023-11-07T05:31:56Z",
"time_travel_point1": 123,
"time_travel_point2": 123,
"updated_at": "2023-11-07T05:31:56Z",
"user_id": 123
}
],
"total_pages": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}