get_retl_failed_records
Read one page of a finished Reverse ETL (rETL) sync run's FAILED records: the rows the destination rejected, each with _rudder_id, primary_key, operation, error_code and error_message.
Get connection_id from list_connections and, optionally, run_id from get_retl_source_syncs (it defaults to the connection's latest run). Filter with error_code (one destination code, e.g. "400"; "null" means no code) or search (a substring of primary_key). Page with page (default 1) and page_size (default 30, max 100); only the first 5000 records of a run are reachable, so filter to reach the rest.
error_message is the destination's own reply text and CAN CONTAIN CUSTOMER DATA; treat the rows as sensitive. Runs a query on the customer's warehouse; it changes no data, but the warehouse bills the compute to the customer. A resume_id call only polls, unless its result expired.
Besides "ok", status can be: error_details_off (the connection does not record per-record errors — nothing to read), not_retained (the run is older than the connection's retention), not_captured (no failed-records table was written for this run), warehouse_config_changed (the warehouse settings changed after the run), or running (the query is still going — call again with the returned resume_id, plus the same workspace_id if this call had one, and no other arguments). If a run's failed-records table cannot be read, you may instead get an error whose text names both possible causes (the warehouse query failed, or the table has aged out) rather than one of those statuses.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-based page number. Default 1. | |
| run_id | No | A sync run id from get_retl_source_syncs. Defaults to the connection's latest run. | |
| search | No | Case-insensitive substring match on primary_key only. At most 256 characters. | |
| page_size | No | Rows per page, 1 to 100. Default 30. | |
| resume_id | No | From an earlier 'running' answer. When set, send only resume_id (plus the same workspace_id if this call had one) and no other arguments. | |
| error_code | No | Keep only records with this destination error code, e.g. "400". The literal "null" keeps records with no code. | |
| workspace_id | Yes | ||
| connection_id | No | The rETL connection, from list_connections. Required unless resume_id is set. | |
| full_messages | No | Default false: each error_message is cut to 500 characters (error_message_truncated is then true). True returns the stored text, up to 2 KB per row. |