Skip to main content

rulesets

Creates, updates, deletes, gets or lists a rulesets resource.

Overview

Namerulesets
TypeResource
Idaws.databrew.rulesets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
create_datestring (date-time)The date and time that the ruleset was created.
created_bystringThe Amazon Resource Name (ARN) of the user who created the ruleset.
descriptionstringThe description of the ruleset.
last_modified_bystringThe Amazon Resource Name (ARN) of the user who last modified the ruleset.
last_modified_datestring (date-time)The modification date and time of the ruleset.
namestringThe name of the ruleset.
resource_arnstringThe Amazon Resource Name (ARN) for the ruleset.
rulesarrayA list of rules that are defined with the ruleset. A rule includes one or more checks to be validated on a DataBrew dataset.
tagsobjectMetadata tags that have been applied to the ruleset.
target_arnstringThe Amazon Resource Name (ARN) of a resource (dataset) that the ruleset is associated with.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_rulesetselectname, regionRetrieves detailed information about the ruleset.
list_rulesetsselectregiontargetArn, maxResults, nextTokenList all rulesets available in the current account or rulesets associated with a specific resource (dataset).
create_rulesetinsertregion, TargetArnCreates a new ruleset that can be used in a profile job to validate the data quality of a dataset.
update_rulesetupdatename, regionUpdates specified ruleset.
delete_rulesetdeletename, regionDeletes a ruleset.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namestringThe name of the ruleset to be deleted.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return in this request.
nextTokenstringA token generated by DataBrew that specifies where to continue pagination if a previous request was truncated. To get the next set of pages, pass in the NextToken value from the response object of the previous page call.
targetArnstringThe Amazon Resource Name (ARN) of a resource (dataset). Using this parameter indicates to return only those rulesets that are associated with the specified resource.

SELECT examples

Retrieves detailed information about the ruleset.

SELECT
create_date,
created_by,
description,
last_modified_by,
last_modified_date,
name,
resource_arn,
rules,
tags,
target_arn
FROM aws.databrew.rulesets
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new ruleset that can be used in a profile job to validate the data quality of a dataset.

INSERT INTO aws.databrew.rulesets (
Name,
Description,
TargetArn,
Rules,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ TargetArn }}' /* required */,
'{{ Rules }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
name
;

UPDATE examples

Updates specified ruleset.

UPDATE aws.databrew.rulesets
SET
Description = '{{ Description }}',
Rules = '{{ Rules }}'
WHERE
name = '{{ name }}' --required
AND region = '{{ region }}' --required
RETURNING
name;

DELETE examples

Deletes a ruleset.

DELETE FROM aws.databrew.rulesets
WHERE name = '{{ name }}' --required
AND region = '{{ region }}' --required
;