create_data_quality_check¶
- DataQualityChecksApi.create_data_quality_check(role_id, create_data_quality_check_request, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create a data quality check
Creates a data quality check for an existing dataset. DatasetId is required. At least one of AreAutoConstraintSuggestionsEnabled=true or a non-empty DqConstraints list must be provided. The check name is auto-generated as dqcheck-{uuid}. Domain is taken from the dataset. Dataset must not be a view, must not already have a DQ check, and TargetLocation must be a supported DWH target (redshift, s3athena, dynamodb, and lf when enabled). Caller needs access to the dataset. On success Message is “Successfully created data quality check” and DataQualityCheckId is returned.
- Parameters:
role_id (str) – Amorphic role ID the request is authorized against. (required)
create_data_quality_check_request (CreateDataQualityCheckRequest) – (required)
content_type (str) – Must be application/json.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: POST /data-quality-checks
Success (HTTP 200)¶
Data quality check created successfully.
Request / response example
{
"Message": "Successfully created data quality check",
"DataQualityCheckId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Errors¶
Documented error codes: IPV-1008, AUTH-1002, GE-1034, GE-1008, GE-1020, EMF-1001, GE-1044.
HTTP 400
Invalid input or authorization failure. Body is {{“Message”: “<CODE> - <text>”}}. Codes include IPV-1008/1013/1020/1041/1043/1062, AUTH-1002, GE-1034 (view/existing DQ/invalid TargetLocation/duplicates), GE-1008 (Glue ruleset failure), GE-1020 (DynamoDB put failure). This Lambda maps InvalidInputException, UnauthorizedUserException, GenericFailureException, ClientError, and ParamValidationError to HTTP 400. Missing run rows return HTTP 422. Uncaught exceptions return HTTP 500 (EMF-1001 wrapping GE-1044).
missingConstraints
{
"Message": "IPV-1008 - Data quality check must contain either AreAutoConstraintSuggestionsEnabled or DqConstraints keys"
}
notAuthorized
{
"Message": "AUTH-1002 - User action is not permitted"
}
HTTP 500
Backend/generic failure. Body is {“Message”: “<CODE> - <text>”} (for example EMF-1001 wrapping).