dbeatty10 / dbt-mysql

dbt-mysql contains all of the code enabling dbt to work with MySQL and MariaDB
Apache License 2.0
75 stars 53 forks source link

Add collation support in profiles.yml / Fix incorrect collation for utf8mb4 #173

Closed kzajaczkowski closed 4 months ago

kzajaczkowski commented 4 months ago

resolves #172

Description

  1. Bumped mysql-connector-python to 8.1, because previous version was by default using incorrect collation for charset utf8mb4 which was utf8mb4_general_ci. The correct default one is utf8mb4_0900_ci_ai and 8.1 version uses it by default.
  2. Added support for overriding charset and collation via profiles.yml which is useful if someone wants to use different charsets and collations by default
  3. Adjusted readme with examples of new settings
  4. I've run all the tests and they passed

Checklist

maver1ck commented 4 months ago

@kzajaczkowski Could you please squash your commits ?

kzajaczkowski commented 4 months ago

@kzajaczkowski Could you please squash your commits ?

Done, can you please recheck?

mwallace582 commented 4 months ago

Thank you for the pull request! I just have a few small comments, but otherwise looks good. I like the idea of exposing this in the adapters configuration file.

kzajaczkowski commented 4 months ago

@mwallace582, thank you for your comments! I've accepted one suggestion, commented on the other one, and also pushed support for mariadb and mysql5 which were missing from the initial PR.

Pipelines are failing though. I've tried to recreate it on my local env and they fail for the main branch as well. So far I didn't manage to find the source of the issue. Any recommendations?

mwallace582 commented 4 months ago

Thank you for making the fixes. I'll look into the test failures, at first glance they look unrelated to your changes.

mwallace582 commented 4 months ago

I've fixed tests in #174. Would you mind re-targeting this pull request at 1.7.latest and merging with that branch? That should fix the tests.