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

Mwallace/merge 1.7 to main #175

Merged
merged 40 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3de7325
Revert "Upgraded to dbt-core 1.4. (#146)"
mwallace582 Jan 9, 2024
6a93e44
Fix version bumping
mwallace582 Jan 9, 2024
43fd634
Remove macos and windows as integration targets
mwallace582 Jan 9, 2024
d43b233
Fix requirements conflict between dbt 1.2 and tox
mwallace582 Jan 9, 2024
1be9405
Bump version to 1.3
mwallace582 Jan 9, 2024
d4332d9
Upgraded to dbt-core 1.4. (#146)
lpezet Jun 11, 2023
732f201
Bump version to 1.5
mwallace582 Jan 9, 2024
49c9e85
Update dbt-core to 1.5 and implement support for model contracts (#163)
mwallace582 Jan 11, 2024
e45c48c
Support Black & MyPy pre-commit hooks (#167)
mwallace582 Jan 16, 2024
0d883c4
Merge branch '1.2.latest' of github.com:dbeatty10/dbt-mysql into 1.3.…
mwallace582 Jan 16, 2024
5ae143d
Merge branch '1.3.latest' of github.com:dbeatty10/dbt-mysql into 1.4.…
mwallace582 Jan 16, 2024
f0507ba
Run black formatter on all files
mwallace582 Jan 16, 2024
147cd7d
Add black commit to .git-blame-ignore-revs
mwallace582 Jan 16, 2024
870bbbf
Run black formatter on all files
mwallace582 Jan 16, 2024
a74fe82
Add black commit to .git-blame-ignore-revs
mwallace582 Jan 16, 2024
dcf64e4
Merge remote-tracking branch 'origin/1.4.latest' into 1.5.latest
mwallace582 Jan 16, 2024
fc06ff2
Fix MyPy & black errors
mwallace582 Jan 16, 2024
befc595
Make the `database` config field nullable again
mwallace582 Jan 16, 2024
9de93b9
Merge branch '1.2.latest' of github.com:dbeatty10/dbt-mysql into 1.3.…
mwallace582 Jan 16, 2024
c0fbf88
Merge branch '1.3.latest' of github.com:dbeatty10/dbt-mysql into 1.4.…
mwallace582 Jan 16, 2024
0fbcedb
Merge remote-tracking branch 'origin/1.4.latest' into 1.5.latest
mwallace582 Jan 16, 2024
3ab4e1a
Fix mypy
mwallace582 Jan 16, 2024
f2e34a2
Merge branch '1.2.latest' of github.com:dbeatty10/dbt-mysql into 1.3.…
mwallace582 Jan 16, 2024
664196f
Merge branch '1.3.latest' of github.com:dbeatty10/dbt-mysql into 1.4.…
mwallace582 Jan 16, 2024
cf7131c
Merge remote-tracking branch 'origin/1.4.latest' into 1.5.latest
mwallace582 Jan 16, 2024
5c2ed3d
Bump version to 1.6
mwallace582 Jan 16, 2024
8b32461
Bump version to 1.7
mwallace582 Jan 16, 2024
53e6c19
Fix import error
mwallace582 Jan 16, 2024
dcb472e
Fix unicode decode error (#169)
mwallace582 Apr 26, 2024
1ad3bf1
Pin jsonschema version to fix tests (#174)
mwallace582 Apr 26, 2024
149157d
Add collation support in profiles.yml / Fix incorrect collation for u…
kzajaczkowski Apr 26, 2024
8d338fa
Merge remote-tracking branch 'origin/1.2.latest' into 1.3.latest
mwallace582 Apr 26, 2024
df883c2
Merge remote-tracking branch 'origin/1.3.latest' into 1.4.latest
mwallace582 Apr 26, 2024
c7acd09
Merge remote-tracking branch 'origin/1.4.latest' into 1.5.latest
mwallace582 Apr 26, 2024
ec1889c
Pin jsonschema version to fix tests
mwallace582 Apr 26, 2024
26ae993
Merge remote-tracking branch 'origin/1.4.latest' into 1.5.latest
mwallace582 Apr 26, 2024
05979ed
Update black to resolve security alert
mwallace582 Apr 26, 2024
3511eb4
Merge remote-tracking branch 'origin/1.5.latest' into 1.6.latest
mwallace582 Apr 26, 2024
04da141
Merge remote-tracking branch 'origin/1.6.latest' into 1.7.latest
mwallace582 Apr 26, 2024
f9653a2
Merge remote-tracking branch 'origin/1.7.latest'
mwallace582 Apr 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@

### Fixes
- Fix incremental composite keys ([#144](https://github.com/dbeatty10/dbt-mysql/issues/144))
- Fix UnicodeDecodeErorr on setup.py ([#160](https://github.com/dbeatty10/dbt-mysql/issues/160))

### Contributors
- [@lpezet](https://github.com/lpezet) ([#146](https://github.com/dbeatty10/dbt-mysql/pull/146))
- [@moszutij](https://github.com/moszutij) ([#146](https://github.com/dbeatty10/dbt-mysql/pull/146), [#144](https://github.com/dbeatty10/dbt-mysql/issues/144))
- [@wesen](https://github.com/wesen) ([#146](https://github.com/dbeatty10/dbt-mysql/pull/146))
- [@mwallace582](https://github.com/mwallace582) ([#162](https://github.com/dbeatty10/dbt-mysql/pull/162), [#163](https://github.com/dbeatty10/dbt-mysql/pull/163), [#164](https://github.com/dbeatty10/dbt-mysql/issues/164), [#138](https://github.com/dbeatty10/dbt-mysql/issues/138))
- [@sagunn-echo](https://github.com/sagunn-echo) ([#160](https://github.com/dbeatty10/dbt-mysql/issues/160))


## dbt-mysql 1.1.0 (Feb 5, 2023)
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,21 @@ your_profile_name:
username: your_mysql_username
password: your_mysql_password
ssl_disabled: True
charset: utf8mb4
collation: utf8mb4_0900_ai_ci
```

| Option | Description | Required? | Example |
| --------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ---------------------------------------------- |
| type | The specific adapter to use | Required | `mysql`, `mysql5` or `mariadb` |
| type | The specific adapter to use | Required | `mysql`, `mysql5` or `mariadb` |
| server | The server (hostname) to connect to | Required | `yourorg.mysqlhost.com` |
| port | The port to use | Optional | `3306` |
| schema | Specify the schema (database) to build models into | Required | `analytics` |
| username | The username to use to connect to the server | Required | `dbt_admin` |
| password | The password to use for authenticating to the server | Required | `correct-horse-battery-staple` |
| ssl_disabled | Set to enable or disable TLS connectivity to mysql5.x | Optional | `True` or `False` |
| charset | Specify charset to be used by a connection | Optional | `utf8mb4` |
| collation | Set to enable or disable TLS connectivity to mysql5.x | Optional | `utf8mb4_0900_ai_ci` |

### Notes

Expand Down
7 changes: 7 additions & 0 deletions dbt/adapters/mariadb/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class MariaDBCredentials(Credentials):
password: Optional[str] = None
charset: Optional[str] = None
ssl_disabled: Optional[bool] = None
collation: Optional[str] = None

_ALIASES = {
"UID": "username",
Expand Down Expand Up @@ -98,6 +99,12 @@ def open(cls, connection):
if credentials.port:
kwargs["port"] = credentials.port

if credentials.charset:
kwargs["charset"] = credentials.charset

if credentials.collation:
kwargs["collation"] = credentials.collation

try:
connection.handle = mysql.connector.connect(**kwargs)
connection.state = "open"
Expand Down
7 changes: 7 additions & 0 deletions dbt/adapters/mysql/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class MySQLCredentials(Credentials):
username: Optional[str] = None
password: Optional[str] = None
charset: Optional[str] = None
collation: Optional[str] = None

_ALIASES = {
"UID": "username",
Expand Down Expand Up @@ -94,6 +95,12 @@ def open(cls, connection):
if credentials.port:
kwargs["port"] = credentials.port

if credentials.charset:
kwargs["charset"] = credentials.charset

if credentials.collation:
kwargs["collation"] = credentials.collation

try:
connection.handle = mysql.connector.connect(**kwargs)
connection.state = "open"
Expand Down
7 changes: 7 additions & 0 deletions dbt/adapters/mysql5/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class MySQLCredentials(Credentials):
password: Optional[str] = None
charset: Optional[str] = None
ssl_disabled: Optional[bool] = None
collation: Optional[str] = None

_ALIASES = {
"UID": "username",
Expand Down Expand Up @@ -98,6 +99,12 @@ def open(cls, connection):
if credentials.port:
kwargs["port"] = credentials.port

if credentials.charset:
kwargs["charset"] = credentials.charset

if credentials.collation:
kwargs["collation"] = credentials.collation

try:
connection.handle = mysql.connector.connect(**kwargs)
connection.state = "open"
Expand Down
3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ git+https://github.com/dbt-labs/[email protected]#egg=dbt-tests-adapter&su

# if version 1.x or greater -> pin to major version
# if version 0.x -> pin to minor
black~=22.12
black~=24.3
bumpversion~=0.6.0
ddtrace~=2.3
jsonschema<=4.17
flake8~=6.1
flaky~=3.7
freezegun~=1.3
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# pull long description from README
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md")) as f:
with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()


Expand Down Expand Up @@ -68,7 +68,7 @@ def _get_dbt_core_version():
include_package_data=True,
install_requires=[
"dbt-core~={}".format(dbt_core_version),
"mysql-connector-python>=8.0.0,<8.1",
"mysql-connector-python>=8.0.0",
],
zip_safe=False,
classifiers=[
Expand Down
Loading