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

Existing tables not found or updated correctly if incoming schema name isn't lower cased #70

Open
tombriggsallego opened this issue Feb 10, 2022 · 0 comments · May be fixed by #71
Open
Labels
bug Something isn't working

Comments

@tombriggsallego
Copy link

Describe the bug
If the incoming schema isn't all lower case (e.g. "MySchema") the code will conclude the tables don't exist and try to recreate them.

To Reproduce
Steps to reproduce the behavior:

  1. Create a schema in MySQL with a mixed-case name (e.g. "MySchema")
  2. Create a table in said schema and put some data in it
  3. Set up a pipeline from MySQL to Postgres and run it. Let target-postgres create the destination schema. This will result in a schema in PG named "myschema"
  4. Add some new data to the table in MySQL.
  5. Re-run the pipeline. target-postgres will log a message saying the table doesn't exist and try to recreate it.

Note that the CREATE TABLE succeeds without error because it includes an IF NOT EXISTS clause. However, if you add a column to your source table the pipeline will fail - because the code thinks the table doesn't exist it tries to create it rather than update the schema.

Expected behavior
The existing table should be recognized, no log message should be generated, and any schema updates should be applied.

Your environment

  • Version of target: git latest
  • Version of python 3.8
  • Meltano latest
@tombriggsallego tombriggsallego added the bug Something isn't working label Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant