> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prequel.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging and visibility

> Investigate every extract and load, and trace failures down to individual records.

Prequel Import makes it easy to investigate every sync, from a whole extract or load down to a single record. Detailed error codes are reported at both the job level and the individual record level, so you can see what happened at each step and why.

## Check an extract or load's status

Fetch any [extract](https://docs.prequel.co/import/core-concepts/dataflow.md#lifecycle-of-a-transfer) or load with [Get extract](https://docs.prequel.co/import/api-reference/extracts/get-extract.md) or [Get load](https://docs.prequel.co/import/api-reference/loads/get-load.md) to see its progress, record counts, and outcome. To find a job, list a Dataset's extracts with [List extracts](https://docs.prequel.co/import/api-reference/extracts/list-extracts.md) or a Stream's loads with [List loads](https://docs.prequel.co/import/api-reference/loads/list-loads.md).

```json title="Get load response" icon="brackets-curly" expandable theme={null}
{
  "status": "success",
  "data": {
    "load": {
      "id": "8c2f4e1a-5b7d-4f3e-9a2c-1d6e8f0b3a47",
      "stream_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "submitted_at": "2026-01-01T00:00:00Z",
      "started_at": "2026-01-01T00:00:05Z",
      "ended_at": "2026-01-01T00:02:10Z",
      "records_processed": 1200,
      "records_transformed": 1200,
      "records_valid": 1200,
      "records_loaded": 1198,
      "records_errored": 2,
      "actor_id": "6b1d2c3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
      "actor_type": "api_key"
    }
  },
  "message": ""
}
```

**started\_at** `timestamp`

When the job started running.

**ended\_at** `timestamp`

When the job finished, failed, or was cancelled.

**records\_errored** `integer`

The number of records that failed.

**error** `object`

Set only when the job failed or was cancelled. Contains a stable `error_code`, a `blame` that indicates which party needs to act, and a `message` describing the failure. See [Error codes](https://docs.prequel.co/import/logging/error-codes.md).

## Inspect failed records

When records fail, fetch the debug rows with [Get extract debug rows](https://docs.prequel.co/import/api-reference/extracts/get-extract-debug-rows.md) or [Get load debug rows](https://docs.prequel.co/import/api-reference/loads/get-load-debug-rows.md) to see which records failed and why.

**has\_error** `boolean`

When `true`, return only records that failed. When `false`, return only records that succeeded. Omit it to return both.

**page\_size** `integer`

The number of records per page, up to `100`. Defaults to `10`. When `has_next` is `true`, request `next_url` to fetch the next page.

```json title="Get load debug rows response" icon="brackets-curly" expandable theme={null}
{
  "status": "success",
  "data": {
    "records": [
      {
        "record_id": "cus_001",
        "event_timestamp": "2026-01-01T00:02:00Z",
        "load": {
          "last_loaded_at": "2026-01-01T00:02:00Z",
          "data": {
            "id": "cus_001",
            "name": "Acme"
          },
          "error": {
            "error_code": "PRQL-NROT",
            "error_trace": "..."
          }
        }
      }
    ]
  },
  "message": "",
  "has_next": false
}
```

Each debug row identifies the record by its `record_id` and reports one stage. Extract debug rows report the `extract` stage. Load debug rows report the `transform`, `load`, or `acknowledge` stage, so a record can appear once per stage. A failed stage includes an `error` with its `error_code` and `error_trace`.

> [!NOTE]
>
> **Record details are read from your datalake**
>
> Because Prequel Import does not persist pipeline data in the application database, record-level requests take longer than other API requests while details are retrieved from your [datalake](https://docs.prequel.co/import/core-concepts/datalake.md). If the datalake sets `retention_window_days`, debug requests for jobs submitted longer ago than that return a `410`.

## Trace a single record

Follow one record from extraction through to delivery and [acknowledgement](https://docs.prequel.co/import/features/acknowledgements.md) with [Get dataset record](https://docs.prequel.co/import/api-reference/datasets/get-dataset-record.md).

**as\_of** `timestamp`

Return the record's state as of this RFC 3339 timestamp. Defaults to the current state.

```json title="Get dataset record response" icon="brackets-curly" expandable theme={null}
{
  "status": "success",
  "data": {
    "record": {
      "record_id": "cus_001",
      "extract": {
        "extract_id": "1f3c9e7a-0b2d-4a8e-9c11-7d6f2b5a4c33",
        "last_extracted_at": "2026-01-01T00:00:30Z",
        "data": {
          "id": "cus_001",
          "name": "Acme"
        },
        "error": {}
      },
      "transform": {
        "transform_id": "5e9a7c3b-2d1f-4a6e-b8c0-4f2d6a9e1b73",
        "last_transformed_at": "2026-01-01T00:01:00Z",
        "data": {
          "customer_id": "cus_001",
          "customer_name": "Acme"
        },
        "error": {}
      },
      "load": {
        "load_id": "8c2f4e1a-5b7d-4f3e-9a2c-1d6e8f0b3a47",
        "last_loaded_at": "2026-01-01T00:02:00Z",
        "error": {
          "error_code": "PRQL-NROT",
          "error_trace": "..."
        }
      },
      "acknowledge": {
        "error": {}
      }
    }
  },
  "message": ""
}
```

**record** `object`

The record's state at each stage: `extract`, `transform`, `load`, and `acknowledge`. Each stage reports when the record last passed through it and an `error` with its `error_code` and `error_trace` if the record failed there. Every stage is always present, so check a stage's timestamp, such as `acknowledge.last_acknowledged_at`, to tell whether the record has reached it.

## Monitor with webhooks

For live error detection, Prequel Import emits webhooks that can be delivered to a variety of monitoring platforms, including Slack, PagerDuty, and Datadog. See [Webhooks and monitoring](https://docs.prequel.co/import/logging/webhooks-and-monitoring.md).

## Cancel in-flight jobs

Stop a queued or running job with [Cancel extract](https://docs.prequel.co/import/api-reference/extracts/cancel-extract.md) or [Cancel load](https://docs.prequel.co/import/api-reference/loads/cancel-load.md).

Cancelling a job that has already ended returns a `409`. Records delivered before cancellation remain delivered.

## Provider-facing monitoring

Job and debug data is designed to be securely displayed to Providers in embedded experiences. [Provider-scoped endpoints](https://docs.prequel.co/import/import-api/provider-scoped.md) let you list, get, and debug a Provider's extracts and loads from your own app, and the [React SDK](https://docs.prequel.co/import/developer-sdks/react-sdk.md) provides hooks for the same data. Record tracing and cancellation require your API key.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.