-
Notifications
You must be signed in to change notification settings - Fork 57
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
Update dbt-core to 1.5 and implement support for model contracts #163
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e582/dbt-mysql into mwallace/support-dbt-1-5
The error was: `AttributeError: 'Namespace' object has no attribute 'MACRO_DEBUGGING'`
3 tasks
Closed
dbeatty10
approved these changes
Jan 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome.
Figuring out how to workaround casting was a crucial piece.
mwallace582
added a commit
that referenced
this pull request
Jan 17, 2024
* Revert "Upgraded to dbt-core 1.4. (#146)" This reverts commit 3db05eb. * Fix version bumping * Migration bump2version (unmaintained) to bump-my-version * Import `bumpversion.cfg` from `dbt-snowflake` * Convert `bumpversion.cfg` to `bumpversion.toml` * Fix a few incorrect version labels * Remove macos and windows as integration targets * Fix requirements conflict between dbt 1.2 and tox * Bump version to 1.3 * Upgraded to dbt-core 1.4. (#146) * Upgraded to dbt-core 1.4. * Updated CHANGELOG. * Fixed policy fields definitions for mariadb and mysql5. * Replaced deprecated dbt.exceptions.raise_compiler_error() with dbt.exceptions.CompilationError. * Now using dbt.exceptions.DbtDatabaseError insead of dbt.exceptions.DatabaseException. * Update version * Update changelog --------- Co-authored-by: Doug Beatty <[email protected]> * Bump version to 1.5 * Update dbt-core to 1.5 and implement support for model contracts (#163) Update dbt-core to 1.5.9 and implement support for constraints * Update changelog * Fix unit test error - The error was: `AttributeError: 'Namespace' object has no attribute 'MACRO_DEBUGGING'` * Allow Unix socket connection rather than just TCP (#165) * Support Black & MyPy pre-commit hooks (#167) * Add black and mypy as pre-commit hooks * Run black formatter on all files * Add MyPy configuration & make tweaks and ignore errors to make MyPy pass * Add .git-blame-ignore-revs to ignore `black` changes in git blame * Update changelog * Run black formatter on all files * Add black commit to .git-blame-ignore-revs * Run black formatter on all files * Add black commit to .git-blame-ignore-revs * Fix MyPy & black errors * Make the `database` config field nullable again * Fix mypy * Bump version to 1.6 * Bump version to 1.7 * Fix import error --------- Co-authored-by: Luke <[email protected]> Co-authored-by: Doug Beatty <[email protected]>
mwallace582
added a commit
that referenced
this pull request
Apr 26, 2024
* Revert "Upgraded to dbt-core 1.4. (#146)" This reverts commit 3db05eb. * Fix version bumping * Migration bump2version (unmaintained) to bump-my-version * Import `bumpversion.cfg` from `dbt-snowflake` * Convert `bumpversion.cfg` to `bumpversion.toml` * Fix a few incorrect version labels * Remove macos and windows as integration targets * Fix requirements conflict between dbt 1.2 and tox * Bump version to 1.3 * Upgraded to dbt-core 1.4. (#146) * Upgraded to dbt-core 1.4. * Updated CHANGELOG. * Fixed policy fields definitions for mariadb and mysql5. * Replaced deprecated dbt.exceptions.raise_compiler_error() with dbt.exceptions.CompilationError. * Now using dbt.exceptions.DbtDatabaseError insead of dbt.exceptions.DatabaseException. * Update version * Update changelog --------- Co-authored-by: Doug Beatty <[email protected]> * Bump version to 1.5 * Update dbt-core to 1.5 and implement support for model contracts (#163) Update dbt-core to 1.5.9 and implement support for constraints * Update changelog * Fix unit test error - The error was: `AttributeError: 'Namespace' object has no attribute 'MACRO_DEBUGGING'` * Allow Unix socket connection rather than just TCP (#165) * Support Black & MyPy pre-commit hooks (#167) * Add black and mypy as pre-commit hooks * Run black formatter on all files * Add MyPy configuration & make tweaks and ignore errors to make MyPy pass * Add .git-blame-ignore-revs to ignore `black` changes in git blame * Update changelog * Run black formatter on all files * Add black commit to .git-blame-ignore-revs * Run black formatter on all files * Add black commit to .git-blame-ignore-revs * Fix MyPy & black errors * Make the `database` config field nullable again * Fix mypy * Bump version to 1.6 * Bump version to 1.7 * Fix import error * Fix unicode decode error (#169) * Update setup.py Explicitly defining utf-8 encoding to avoid UnicodeDecodeError on setup.py in Windows environment * Update CHANGELOG.md --------- Co-authored-by: Scott Gunn <[email protected]> * Pin jsonschema version to fix tests (#174) * Add collation support in profiles.yml / Fix incorrect collation for utf8mb4 (#173) * Add support for charset and collation in profile.yml * Change mysql-connect-python version * Update readme with new profile options * Update setup.py with less restricting mysql-connector-python version after code review Co-authored-by: Matthew Wallace <[email protected]> * Add collation and charset support for mariadb and mysql5 --------- Co-authored-by: Matthew Wallace <[email protected]> * Pin jsonschema version to fix tests * Update black to resolve security alert https://github.com/dbeatty10/dbt-mysql/security/dependabot/5 --------- Co-authored-by: Luke <[email protected]> Co-authored-by: Doug Beatty <[email protected]> Co-authored-by: Scott Gunn <[email protected]> Co-authored-by: Krzysztof Zajączkowski <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #145
Description
I've followed the instructions published for updating to dbt-core 1.5 and implemented support for model contracts.
I was able to get all of the new test classes to pass, and model contracts are working as expected for my dbt models.
There's some trickiness with the difference between types that MySQL allows in schemas, and the types that can be passed into calls to
CAST()
. I've handed some of the obvious cases, but it's possible that there are gaps with more obscure types.Checklist
CHANGELOG.md
with information about my change