Skip to main content
POST
/
destinations
/
{destination_id}
/
data-integrity
Create data integrity job for a destination
curl --request POST \
  --url https://api.prequel.co/destinations/{destination_id}/data-integrity \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "models": [
    {
      "model_name": "<string>",
      "sample_primary_key_ids": [
        "<string>"
      ]
    }
  ],
  "start_integrity_window_at": "2023-11-07T05:31:56Z",
  "end_integrity_window_at": "2023-11-07T05:31:56Z"
}
'
{
  "status": "<string>",
  "data": {
    "job": {
      "id": "<string>",
      "org_schema": "<string>",
      "submitted_at": "2023-11-07T05:31:56Z",
      "started_at": "2023-11-07T05:31:56Z",
      "ended_at": "2023-11-07T05:31:56Z",
      "destination_id": "<string>",
      "status": "<string>",
      "model_ids": [
        "<string>"
      ],
      "model_sample_primary_ids": {},
      "data_integrity_results": [
        {
          "model_name": "<string>",
          "is_healthy": true,
          "error_message": "<string>",
          "sampling_rate": 123,
          "total_rows_compared": 123,
          "total_rows_stale": 123,
          "total_rows_pending": 123,
          "total_rows_missing": 123,
          "total_rows_incorrect": 123,
          "total_rows_orphaned": 123,
          "mismatched_partitions": [
            {
              "source_row_count": 123,
              "destination_row_count": 123,
              "last_modified_lower_bound_epoch": 123,
              "last_modified_upper_bound_epoch": 123
            }
          ]
        }
      ],
      "log_message": "<string>"
    }
  },
  "message": "<string>"
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

destination_id
string
required

Destination ID.

Body

application/json
models
object[]

Specifies models to run. Include sample primary keys to specify specific rows to check.

start_integrity_window_at
string<date-time>

Last Modified Epoch to use as a lower bound to queries

end_integrity_window_at
string<date-time>

Last Modified Epoch to use as a upper bound to queries

Response

OK

status
string
required
Allowed value: "success"
data
object
required
message
string
required