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

Test MySQL 5.6 #22

Closed dbeatty10 closed 3 years ago

dbeatty10 commented 3 years ago

MySQL 5.6 doesn't end support until Feb 2021. We should test of dbt-mysql works or not for this version of MySQL.

Preferably, this testing would be automated within CI.

WITH (Common Table Expressions aka CTE) aren't supported until MySQL 8.0, so that could be a big gotcha if they are used under the covers at all.

AndersonReyes commented 3 years ago

I can help with this as my team just used this package to actually do a test run locally (our db is mysql 5.6) but this prob depends on #9 to make it easy to install deps. Should I do both in one go? should be simple

AndersonReyes commented 3 years ago

Also how you want to structure the tests? I was thinking just regular dockerfile and docker compose to manage all the db containers and just multiple spec files for each db

AndersonReyes commented 3 years ago

but I agree the ctes in the adapter tests are a pain

dbt.exceptions.RuntimeException: Runtime Error in model passing_model (models/passing_model.sql)
  ('42000', "[42000] [MySQL][ODBC 8.0(w) Driver][mysqld-5.6.50]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '__dbt__CTE__ephemeral as (\n\n\nwith my_cool_cte as (\n  select name, id from dbt_te' at line 4 (1064) (SQLExecDirectW)")

hmm what you think? might be worth creating a dummy project without ctes and running as many tests as we can that way otherwise the adapter will always fail (unless we hack it or something). But shouldn't be too hard to setup tests or possibly get the generated

AndersonReyes commented 3 years ago

Word thanks bro you had work on it already👍🏾👍🏾