Create a data diff
Create a new data diff to compare datasets via the Datafold API.
Authorizations
Body
Infer primary key columns automatically before running the diff. When true, pk_columns may be omitted; the inferred PK is stored back on the diff. Supported configurations: in-db diffs (all input types); cross-db diffs with query inputs on both sides (PK is inferred inside DuckDB after fetch); and cross-db diffs with a table input on either side, where the PK is inferred against the source warehouse before the fetch (requires the primary-key-inference feature to be enabled for your organization). Not supported: file-based diffs — use POST /api/v1/data_sources/{id}/guess_pk and pass pk_columns explicitly. For in-db query inputs, materialization is auto-forced.
Extra column types to skip during PK inference, on top of the built-in defaults (float, timestamp, array, boolean, binary, unsupported). Use canonical type names (e.g. 'integer', 'text') or 'db:<RAW_TYPE>' to target a raw warehouse type (e.g. 'db:JSONB'). Requires infer_pk=true and pk_columns empty; rejected with 422 otherwise.
Table-level modifiers. Allowed values: 'case_insensitive_strings' (ignore string case), 'null_equals_empty_string' (treat NULL and empty string as equal when one warehouse uses NULL and another uses '' for missing text).
case_insensitive_strings, null_equals_empty_string Response
Successful Response
Infer primary key columns automatically before running the diff. When true, pk_columns may be omitted; the inferred PK is stored back on the diff. Supported configurations: in-db diffs (all input types); cross-db diffs with query inputs on both sides (PK is inferred inside DuckDB after fetch); and cross-db diffs with a table input on either side, where the PK is inferred against the source warehouse before the fetch (requires the primary-key-inference feature to be enabled for your organization). Not supported: file-based diffs — use POST /api/v1/data_sources/{id}/guess_pk and pass pk_columns explicitly. For in-db query inputs, materialization is auto-forced.
Extra column types to skip during PK inference, on top of the built-in defaults (float, timestamp, array, boolean, binary, unsupported). Use canonical type names (e.g. 'integer', 'text') or 'db:<RAW_TYPE>' to target a raw warehouse type (e.g. 'db:JSONB'). Requires infer_pk=true and pk_columns empty; rejected with 422 otherwise.
Token of the diff's public share link, if one is active. Populated only on GET /datadiffs/{id} for callers who could mint the link themselves (public sharing enabled for the organization, CREATE_DATADIFF, and read access to the diff); null everywhere else, including list responses.
Public share URL built from share_token; same visibility rule.
Table-level modifiers. Allowed values: 'case_insensitive_strings' (ignore string case), 'null_equals_empty_string' (treat NULL and empty string as equal when one warehouse uses NULL and another uses '' for missing text).
case_insensitive_strings, null_equals_empty_string 