Skip to content

feat(glue-alpha): wrap DataQualityRuleset DQDL in a typed value object - #38587

Merged
mergify[bot] merged 4 commits into
mainfrom
otaviom/glue/dqdl-value-object
Aug 18, 2026
Merged

feat(glue-alpha): wrap DataQualityRuleset DQDL in a typed value object#38587
mergify[bot] merged 4 commits into
mainfrom
otaviom/glue/dqdl-value-object

Conversation

@otaviomacedo

Copy link
Copy Markdown
Contributor

The ruleset's primary payload was a bare rulesetDqdl: string passed straight to the L1 with no type identity. Introduce a Dqdl value object built via Dqdl.fromString(...) and take it as the dqdl prop, so the DQDL document is a named, discoverable type with a clear escape hatch rather than an anonymous string. Glue still parses and validates the DQDL at deploy time; the rendered string is unchanged, so synthesized output is identical.

This is the minimal (escape-hatch-only) shape; modeling individual rules as typed objects was considered and deliberately deferred — the service is the source of truth for DQDL validation and the language is large and evolving, so fromString gives full coverage today.

Addresses the DataQualityRuleset.rulesetDqdl finding from the aws-glue-alpha pre-GA API review.

BREAKING CHANGE: DataQualityRulesetProps.rulesetDqdl: string is replaced by
dqdl: Dqdl. Build it with Dqdl.fromString('Rules = [ ... ]').


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

The ruleset's primary payload was a bare `rulesetDqdl: string` passed straight to
the L1 with no type identity. Introduce a `Dqdl` value object built via
`Dqdl.fromString(...)` and take it as the `dqdl` prop, so the DQDL document is a
named, discoverable type with a clear escape hatch rather than an anonymous
string. Glue still parses and validates the DQDL at deploy time; the rendered
string is unchanged, so synthesized output is identical.

This is the minimal (escape-hatch-only) shape; modeling individual rules as typed
objects was considered and deliberately deferred — the service is the source of
truth for DQDL validation and the language is large and evolving, so `fromString`
gives full coverage today.

Addresses the DataQualityRuleset.rulesetDqdl finding from the aws-glue-alpha
pre-GA API review.

BREAKING CHANGE: `DataQualityRulesetProps.rulesetDqdl: string` is replaced by
`dqdl: Dqdl`. Build it with `Dqdl.fromString('Rules = [ ... ]')`.
@mergify mergify Bot added the contribution/core This is a PR that came from AWS. label Aug 17, 2026
@mergify
mergify Bot deployed to automation August 17, 2026 16:16 Active
@github-actions github-actions Bot added the p2 label Aug 17, 2026
@aws-cdk-automation
aws-cdk-automation requested a review from a team August 17, 2026 16:16
@otaviomacedo otaviomacedo added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Aug 17, 2026
@mergify
mergify Bot deployed to automation August 17, 2026 16:17 Active
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This pull request description does not follow the correct template structure.

PRs without a linked issue will receive lower priority for review and merging. Please update the description to follow the PR template and include a line like Closes #123 in the Issue section. If no existing issue matches your change, create one first.

@aws-cdk-automation aws-cdk-automation left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

The ruleset's primary payload was a bare `rulesetDqdl: string` passed straight to
the L1 with no type identity. Introduce a `Dqdl` value object built via
`Dqdl.fromString(...)` and take it as the `dqdl` prop, so the DQDL document is a
named, discoverable type with a clear escape hatch rather than an anonymous
string. Glue still parses and validates the DQDL at deploy time; the rendered
string is unchanged, so synthesized output is identical.

This is the minimal (escape-hatch-only) shape; modeling individual rules as typed
objects was considered and deliberately deferred — the service is the source of
truth for DQDL validation and the language is large and evolving, so `fromString`
gives full coverage today.

Addresses the DataQualityRuleset.rulesetDqdl finding from the aws-glue-alpha
pre-GA API review.

BREAKING CHANGE: `DataQualityRulesetProps.rulesetDqdl: string` is replaced by
`dqdl: Dqdl`. Build it with `Dqdl.fromString('Rules = [ ... ]')`.
@aws-cdk-automation
aws-cdk-automation dismissed their stale review August 17, 2026 16:22

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 17, 2026
*
* @param dqdl the DQDL document, e.g. `Rules = [ RowCount > 100 ]`.
*/
public static fromString(dqdl: string): Dqdl {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, we can add more factories, for more structured inputs, like a list of rules (of a possible Rule type).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The future extensibility is a good option but did we have any specific request or reason to do this type wrapping ? Are the ddql rule based wrappers coming up in next set of PRs ?(Or even ddql query validation checks)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't make it type safe now, we won't be able to do it after graduation (other than by deprecating it and adding another type safe prop). This is in line with the rest of the library. For example, Schedule, that you can construct with cron elements, or a rate, but there is always the string escape hatch. A closer analogue is probably StepFunction's ASL, for which we have also created a type safe API around.

I'm not planning on creating the Rule type for now, because it takes some care to get right. Here's the syntax so you have an idea. But I think it's worth doing it, eventually.

@mergify

mergify Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify

mergify Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-08-18 13:28 UTC · Rule: default-squash · triggered by rule automatic merge
  • Checks passed · in-place
  • Merged2026-08-18 15:19 UTC · at 349c0b7699000ddb5890fd3084c69228ccd5d252 · squash

This pull request spent 1 hour 50 minutes 33 seconds in the queue, including 56 minutes 59 seconds running CI.

Required conditions to merge

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 18, 2026
@mergify

mergify Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
mergify Bot deployed to automation August 18, 2026 14:22 Active
@mergify
mergify Bot deployed to automation August 18, 2026 14:22 Active
@mergify

mergify Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
mergify Bot merged commit fd01268 into main Aug 18, 2026
19 of 20 checks passed
@mergify
mergify Bot deleted the otaviom/glue/dqdl-value-object branch August 18, 2026 15:19
@github-actions

Copy link
Copy Markdown
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants