-
Notifications
You must be signed in to change notification settings - Fork 72
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
Handle uppercase references from Metabase GUI derived queries #242
Handle uppercase references from Metabase GUI derived queries #242
Conversation
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.
Read CONTRIBUTING.md carefully and run all the checks locally before committing code.
Also pick one API fixture (JSON files) used by the exposure tests and capitalise the name in the response to illustrate your Snowflake case, so that the tests fail before your fix and succeed after.
Thanks for your guidance @gouline. I modified the One thing I noticed, however, is that we don't actively test table join exposures coming from non-sql questions. The only metabase question with a join is card 23 but this card also happens to be the only one that is missing from the expected exposures. I wasn't sure how to add this exposure fixture back in but I believe it could/should be handled in a followup PR, since it was missing before my PR. I'd be happy to make the change if you give me a nudge in the right direction 🙂 |
I fixed this in #244. |
Relates to discussion: https://github.com/gouline/dbt-metabase/discussions/241
Some data warehouses, such as snowflake, store their object names (database, schema, table, columns) in uppercase (ref).
This means that metabase questions derived from the visual editor (GUI) need to have their sources lowercased in order to match with dbt's models and nodes. We already do this for SQL native queries (refs: 1, 2) so this is just a continuation of that logic.
Update
If
table.json
fixture is modified to contain uppercase table names, the exposure tests fail before this change is applied and pass after it is applied.