Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds minimal model contract enforcement for glue adapter #297

Merged
merged 5 commits into from
Dec 14, 2023

Conversation

brianhtn
Copy link
Contributor

@brianhtn brianhtn commented Dec 2, 2023

resolves #296

Description

This PR adds limited dbt model contract enforcement for the glue adapter. It adds a call to the get_assert_columns_equivalent() macro which is used to enforce the schemas for view and table materializations.

I say "limited" because it's missing a portion of the enforcements which includes but not limited to constraints and potential various Glue specific datatypes. In this PR, I only addressed the string type.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-glue next" section.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@menuetb menuetb added the enable-functional-tests This label enable functional tests label Dec 14, 2023
@menuetb menuetb merged commit 4192346 into aws-samples:main Dec 14, 2023
1 check failed
aajisaka added a commit to aajisaka/dbt-glue that referenced this pull request Jan 23, 2024
aajisaka added a commit to aajisaka/dbt-glue that referenced this pull request Jan 23, 2024
aajisaka added a commit to aajisaka/dbt-glue that referenced this pull request Jan 23, 2024
moomindani pushed a commit that referenced this pull request Jan 24, 2024
* Revert "Bump black from 23.11.0 to 23.12.0 (#303)"

This reverts commit ee2aa88.

* Revert "Update versions"

This reverts commit f6a377e.

* Revert "Adds minimal model contract enforcement for glue adapter (#297)"

This reverts commit 4192346.

* Revert "Fix wrong role create db#285 (#286)"

This reverts commit 1416de8.

* Revert "Glue session: enable users to fix their glue_session_id name and re-use it (#301)"

This reverts commit d2d31f1.

* Revert "Revert "Update versions""

This reverts commit 2b5e656.

* Revert "Revert "Bump black from 23.11.0 to 23.12.0 (#303)""

This reverts commit 9a2b094.

* Update CHANGELOG
moomindani pushed a commit to moomindani/dbt-glue that referenced this pull request Jan 25, 2024
…#297)

* Updated to check for contract enforcement

* Added a method correct string types for glue columns

* Updated the CHANGELOG with changes

* Utilize new GlueColumn class

---------

Co-authored-by: Brian Nguyen <[email protected]>
Co-authored-by: menuetb <[email protected]>
moomindani added a commit that referenced this pull request Jan 25, 2024
… re-use it (#322)

* Adds minimal model contract enforcement for glue adapter (#297)

* Updated to check for contract enforcement

* Added a method correct string types for glue columns

* Updated the CHANGELOG with changes

* Utilize new GlueColumn class

---------

Co-authored-by: Brian Nguyen <[email protected]>
Co-authored-by: menuetb <[email protected]>

* fixed bug

---------

Co-authored-by: brianhtn <[email protected]>
Co-authored-by: Brian Nguyen <[email protected]>
Co-authored-by: menuetb <[email protected]>
Co-authored-by: Vincent.PAUWELS <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enable-functional-tests This label enable functional tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DBT Model Contracts are not being enforced.
2 participants