POST
/
api
/
v1
/
datadiffs
curl --request POST \
  --url https://app.datafold.com/api/v1/datadiffs \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "algorithm": "join",
  "archived": false,
  "bisection_factor": 123,
  "bisection_threshold": 123,
  "column_mapping": [
    [
      "<any>"
    ]
  ],
  "columns_to_compare": [
    "<string>"
  ],
  "compare_duplicates": true,
  "data_source1_id": 123,
  "data_source1_session_parameters": {},
  "data_source2_id": 123,
  "data_source2_session_parameters": {},
  "diff_tolerance": 123,
  "diff_tolerances_per_column": [
    {
      "column_name": "<string>",
      "tolerance_mode": "absolute",
      "tolerance_value": 123
    }
  ],
  "download_limit": 123,
  "exclude_columns": [
    "<string>"
  ],
  "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": "<string>",
    "skip_head_rows": 123,
    "skip_tail_rows": 123
  },
  "filter1": "<string>",
  "filter2": "<string>",
  "include_columns": [
    "<string>"
  ],
  "materialization_destination_id": 123,
  "materialize_dataset1": true,
  "materialize_dataset2": true,
  "materialize_without_sampling": true,
  "per_column_diff_limit": 123,
  "pk_columns": [
    "<string>"
  ],
  "purged": false,
  "query1": "<string>",
  "query2": "<string>",
  "sampling_confidence": 123,
  "sampling_ratio": 123,
  "sampling_threshold": 123,
  "sampling_tolerance": 123,
  "table1": [
    "<string>"
  ],
  "table2": [
    "<string>"
  ],
  "table_modifiers": [
    "case_insensitive_strings"
  ],
  "tags": [
    "<string>"
  ],
  "time_aggregate": "minute",
  "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
}'
{
  "affected_columns": [
    "<string>"
  ],
  "algorithm": "join",
  "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": [
    [
      "<any>"
    ]
  ],
  "columns_to_compare": [
    "<string>"
  ],
  "compare_duplicates": true,
  "created_at": "2023-11-07T05:31:56Z",
  "data_app_metadata": {
    "data_app_id": 123,
    "data_app_model1_id": "<string>",
    "data_app_model1_name": "<string>",
    "data_app_model2_id": "<string>",
    "data_app_model2_name": "<string>",
    "data_app_model_type": "<string>",
    "meta_data": {}
  },
  "data_app_type": "<string>",
  "data_source1_id": 123,
  "data_source1_session_parameters": {},
  "data_source2_id": 123,
  "data_source2_session_parameters": {},
  "diff_stats": {
    "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,
    "rows_added": 123,
    "rows_removed": 123,
    "sampled": true,
    "table_a_row_count": 123,
    "table_b_row_count": 123,
    "version": "<string>"
  },
  "diff_tolerance": 123,
  "diff_tolerances_per_column": [
    {
      "column_name": "<string>",
      "tolerance_mode": "absolute",
      "tolerance_value": 123
    }
  ],
  "done": true,
  "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": "<string>",
    "skip_head_rows": 123,
    "skip_tail_rows": 123
  },
  "filter1": "<string>",
  "filter2": "<string>",
  "finished_at": "2023-11-07T05:31:56Z",
  "id": 123,
  "include_columns": [
    "<string>"
  ],
  "kind": "in_db",
  "materialization_destination_id": 123,
  "materialize_dataset1": true,
  "materialize_dataset2": true,
  "materialize_without_sampling": true,
  "monitor_error": {
    "error_type": "<string>",
    "error_value": "<string>"
  },
  "monitor_id": 123,
  "monitor_state": "ok",
  "per_column_diff_limit": 123,
  "pk_columns": [
    "<string>"
  ],
  "purged": false,
  "query1": "<string>",
  "query2": "<string>",
  "result": "error",
  "result_revisions": {},
  "result_statuses": {},
  "runtime": 123,
  "sampling_confidence": 123,
  "sampling_ratio": 123,
  "sampling_threshold": 123,
  "sampling_tolerance": 123,
  "source": "interactive",
  "status": "needs_confirmation",
  "table1": [
    "<string>"
  ],
  "table2": [
    "<string>"
  ],
  "table_modifiers": [
    "case_insensitive_strings"
  ],
  "tags": [
    "<string>"
  ],
  "temp_schema_override": [
    "<string>"
  ],
  "time_aggregate": "minute",
  "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
}

Authorizations

Authorization
string
header
required

Use the 'Authorization' header with the format 'Key <api-key>'

Body

application/json
data_source1_id
integer
required
data_source2_id
integer
required
pk_columns
string[]
required
algorithm
enum<string> | null
Available options:
join,
hash,
hash_v2_alpha,
fetch_and_join
archived
boolean
default:
false
bisection_factor
integer | null
bisection_threshold
integer | null
column_mapping
array | null
columns_to_compare
string[] | null
compare_duplicates
boolean | null
data_source1_session_parameters
object | null
data_source2_session_parameters
object | null
diff_tolerance
number | null
diff_tolerances_per_column
object[] | null
download_limit
integer | null
exclude_columns
string[] | null
file1
string | null
Minimum length: 1
file1_options
object | null
file2
string | null
Minimum length: 1
file2_options
object | null
filter1
string | null
filter2
string | null
include_columns
string[] | null
materialization_destination_id
integer | null
materialize_dataset1
boolean | null
materialize_dataset2
boolean | null
materialize_without_sampling
boolean | null
default:
false
per_column_diff_limit
integer | null
purged
boolean
default:
false
query1
string | null
query2
string | null
sampling_confidence
number | null
sampling_ratio
number | null
sampling_threshold
integer | null
sampling_tolerance
number | null
table1
string[] | null
table2
string[] | null
table_modifiers
enum<string>[] | null
Available options:
case_insensitive_strings
tags
string[] | null
time_aggregate
enum<string> | null
Available options:
minute,
hour,
day,
week,
month,
year
time_column
string | null
time_interval_end
string | null
time_interval_start
string | null
time_travel_point1
time_travel_point2

Response

200
application/json
Successful Response
data_source1_id
integer
required
data_source2_id
integer
required
kind
enum<string>
required
Available options:
in_db,
cross_db
pk_columns
string[]
required
affected_columns
string[] | null
algorithm
enum<string> | null
Available options:
join,
hash,
hash_v2_alpha,
fetch_and_join
archived
boolean
default:
false
bisection_factor
integer | null
bisection_threshold
integer | null
ci_base_branch
string | null
ci_pr_branch
string | null
ci_pr_num
integer | null
ci_pr_sha
string | null
ci_pr_url
string | null
ci_pr_user_display_name
string | null
ci_pr_user_email
string | null
ci_pr_user_id
string | null
ci_pr_username
string | null
ci_run_id
integer | null
ci_sha_url
string | null
column_mapping
array | null
columns_to_compare
string[] | null
compare_duplicates
boolean | null
created_at
string | null
data_app_metadata
object | null
data_app_type
string | null
data_source1_session_parameters
object | null
data_source2_session_parameters
object | null
diff_stats
object | null
diff_tolerance
number | null
diff_tolerances_per_column
object[] | null
done
boolean | null
default:
false
download_limit
integer | null
exclude_columns
string[] | null
execute_as_user
boolean | null
file1
string | null
Minimum length: 1
file1_options
object | null
file2
string | null
Minimum length: 1
file2_options
object | null
filter1
string | null
filter2
string | null
finished_at
string | null
id
integer | null
include_columns
string[] | null
materialization_destination_id
integer | null
materialize_dataset1
boolean | null
materialize_dataset2
boolean | null
materialize_without_sampling
boolean | null
default:
false
monitor_error
object | null
monitor_id
integer | null
monitor_state
enum<string> | null
Available options:
ok,
alert,
error,
learning,
checking,
created,
skipped,
cancelled
per_column_diff_limit
integer | null
purged
boolean
default:
false
query1
string | null
query2
string | null
result
enum<string> | null
Available options:
error,
bad-pks,
different,
missing-pks,
identical
result_revisions
object
result_statuses
object | null
runtime
number | null
sampling_confidence
number | null
sampling_ratio
number | null
sampling_threshold
integer | null
sampling_tolerance
number | null
source
enum<string> | null
Available options:
interactive,
demo_signup,
manual,
api,
ci,
schedule,
auto
status
enum<string> | null
Available options:
needs_confirmation,
needs_authentication,
waiting,
processing,
done,
failed,
cancelled
table1
string[] | null
table2
string[] | null
table_modifiers
enum<string>[] | null
Available options:
case_insensitive_strings
tags
string[] | null
temp_schema_override
string[] | null
time_aggregate
enum<string> | null
Available options:
minute,
hour,
day,
week,
month,
year
time_column
string | null
time_interval_end
string | null
time_interval_start
string | null
time_travel_point1
time_travel_point2
updated_at
string | null
user_id
integer | null