Closed pekkajauhi closed 2 years ago
Hi @pekkajauhi thanks so much for opening this issue. This seems to be an issue at the core of how the view_sql
is being generated. I will forward this bug report to our engineering team to address this during the sync to the fivetran_formula
table.
Additionally, our team is currently working on the Bug #34 and should have a fix implemented following the new year!
Hi @pekkajauhi a fix has been implemented into the connector code and the dbt package code earlier this morning. Would you mind trying your run again and letting me know if you still see the issue persist?
Hi @fivetran-joemarkiewicz I tried running some models and everything seems to be working as expected. Thanks!
That's great news! Thanks so much for checking @pekkajauhi 😄
Closing this issue, but feel free to open a new issue if you have any other questions in the future.
Are you a current Fivetran customer?
Yes. Jukka-Pekka Jauhiainen, Data Engineer, Kalevamedia
Describe the bug
When a formula field is included that requires the use of multiple left joins, the tablename in the join condition is missing __alias from the end.
For example if I have a formula field in the account table that uses field from the user_role table, which is joined with two left joins and the user table, view_sql will look something like this:
The last join condition should look like this:
user__alias.user_role_id = user_role__alias.id
but instead the join condition looks like this:user.user_role_id = user_role__alias.id
Resulting in the following error:
I'm not sure if this is a bug in the macro or is there a problem in the way view_sql is generated. But I think the problem could be fixed with some changes to the macro.
Steps to reproduce
Expected behavior
Project variables configuration
Package Version
Warehouse
- [ ] BigQuery - [ ] Redshift - [X] Snowflake - [ ] Postgres - [ ] Databricks - [ ] Other (provide details below) **Additional context** **Screenshots**Please indicate the level of urgency
We are working on a important dashboard and this package would make things a lot easier, but because of this (and this) bug, we can't really use this package.
Are you interested in contributing to this package?