data-quality

Embed
Preview of the card
<a href="https://lucida.15-204-158-166.sslip.io/docs/ref-data-quality"><img src="https://lucida.15-204-158-166.sslip.io/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/1c5372d3-2c8d-4e0d-8de8-791a913c6051/social-card.svg?v=3e7ae33eec8b" alt="data-quality" width="600" height="315"></a>
POSThttps://lucida.15-204-158-166.sslip.io/v1/internal/warehouse/projects/{project_id}/stage-runs/{run_id}/audit

Parameters

project_idstringpathrequired
run_idstringpathrequired

Request body

application/json
sweep_cutoffinteger
A full-mirror sweep the run deferred to publish: rows of sweep_source older than this version (unix ms) are judged as deleted.
sweep_sourcestring
tablestringrequired
The synced table (warehouse_rows.table_name), without the synced_ prefix.
{
  "sweep_cutoff": 0,
  "sweep_source": "string",
  "table": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/internal/warehouse/projects/{project_id}/stage-runs/{run_id}/audit" \
  -H "Content-Type: application/json" \
  -d '{"sweep_cutoff":0,"sweep_source":"string","table":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "checks": 0,
  "failed": [
    "string"
  ]
}
Schema
checksintegerrequired
How many checks gate the table.
failedstring[]required
Names of the failing checks; empty means publish.
400
401
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks

Parameters

project_idstringpathrequired
tagstringpathrequired
statusstringpathrequired
pass, fail, error or not_run.
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of DqCheck, newest first
404
POSThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks

Parameters

project_idstringpathrequired

Request body

application/json

A check as created or replaced.

column_namestring
config
values, to_table, to_column, min, max, max_age_hours, sql, window_days, window_column, to_window_days, to_window_column.
enabledboolean
kindstringrequired
not_null, unique, accepted_values, relationship, row_count, freshness, custom_sql.
namestringrequired
schedulestring
severitystring
tagsstring[]
target_tablestringrequired
Any table or SQL view readable in SQL (events, persons, groups, a view name).
{
  "column_name": "string",
  "config": {},
  "enabled": true,
  "kind": "string",
  "name": "string",
  "schedule": "string",
  "severity": "string",
  "tags": [
    "string"
  ],
  "target_table": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks" \
  -H "Content-Type: application/json" \
  -d '{"column_name":"string","config":{},"enabled":true,"kind":"string","name":"string","schedule":"string","severity":"string","tags":["string"],"target_table":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "column_name": "string",
  "config": {},
  "created_at": "2024-01-01T00:00:00Z",
  "enabled": true,
  "failing_since": "2024-01-01T00:00:00Z",
  "id": "string",
  "kind": "string",
  "last_run_at": "2024-01-01T00:00:00Z",
  "last_status": "string",
  "name": "string",
  "schedule": "string",
  "severity": "string",
  "tags": [
    "string"
  ],
  "target_table": "string",
  "updated_at": "2024-01-01T00:00:00Z"
}
Schema
column_namestringrequired
configrequired
created_atstringrequired
enabledbooleanrequired
failing_sincestring
Start of the current failing streak.
idstringrequired
kindstringrequired
not_null, unique, accepted_values, relationship, row_count, freshness, custom_sql.
last_run_atstring
last_statusstring
pass, fail, error; null before the first run.
namestringrequired
schedulestringrequired
manual, after_refresh, after_sync, 1h, 6h, 12h, daily, weekly.
severitystringrequired
error or warning.
tagsstring[]required
target_tablestringrequired
updated_atstringrequired
400
403
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

404
PUThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json

A check as created or replaced.

column_namestring
config
values, to_table, to_column, min, max, max_age_hours, sql, window_days, window_column, to_window_days, to_window_column.
enabledboolean
kindstringrequired
not_null, unique, accepted_values, relationship, row_count, freshness, custom_sql.
namestringrequired
schedulestring
severitystring
tagsstring[]
target_tablestringrequired
Any table or SQL view readable in SQL (events, persons, groups, a view name).
{
  "column_name": "string",
  "config": {},
  "enabled": true,
  "kind": "string",
  "name": "string",
  "schedule": "string",
  "severity": "string",
  "tags": [
    "string"
  ],
  "target_table": "string"
}

Code samples

cURL
curl -X PUT "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}" \
  -H "Content-Type: application/json" \
  -d '{"column_name":"string","config":{},"enabled":true,"kind":"string","name":"string","schedule":"string","severity":"string","tags":["string"],"target_table":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
DELETEhttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204 Deleted; run history kept
403
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}/failing-rows

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}/failing-rows"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "measure_sql": "string",
  "sql": "string"
}
Schema
measure_sqlstringrequired
LQL computing the observed number.
sqlstring
LQL listing up to 100 failing rows; null for row-count and freshness checks.
404
POSThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}/run

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}/run"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "check_id": "string",
  "duration_ms": 0,
  "error": "string",
  "observed": 0,
  "status": "string"
}
Schema
check_idstringrequired
duration_msintegerrequired
errorstring
observednumber
Failing rows, the row count, or the newest row's age in seconds.
statusstringrequired
pass, fail or error.
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}/runs

Parameters

project_idstringpathrequired
idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/checks/{id}/runs"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of DqRun, newest first
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/health

Parameters

project_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/data-quality/health"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "disabled": 0,
  "erroring": 0,
  "failing": 0,
  "healthy": 0,
  "not_run": 0,
  "overall": "string",
  "warning": 0
}
Schema
disabledintegerrequired
erroringintegerrequired
failingintegerrequired
Failing checks of error severity.
healthyintegerrequired
not_runintegerrequired
overallstringrequired
warningintegerrequired
Failing checks of warning severity.
404

Updated