-
Notifications
You must be signed in to change notification settings - Fork 43
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
compare_relations adapter.get_relation doesn't work as in the README #82
Comments
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
I'm not sure how you would create an integration test for this, because building a model works fine - it's just the preview that fails. |
I think that instead of fixing the readme we can/should fix the various macros!
|
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
Describe the bug
The compare_relations macro seems to have an issue with the adapter.get_relation value on the get_filtered_columns_in_relation operation. It seems to work with an {% if execute %} wrapper, though.
Steps to reproduce
Copy the code from the README for compare_relations, then use it as-is, swapping the adapter.get_relations call to an accessible table. Try to run the macro - you will get an error with an empty value.
Expected results
A summarized comparison between the two datasets. Using Benoit's suggestion from an internal channel, the macro works fine like this:
Actual results
With the snippet in the README:
![Screenshot 2023-09-12 at 6 01 17 PM](https://private-user-images.githubusercontent.com/60892553/267486963-cf438758-08ea-47a0-9392-b46ac4f7e87d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2ODgzOTYsIm5iZiI6MTczOTY4ODA5NiwicGF0aCI6Ii82MDg5MjU1My8yNjc0ODY5NjMtY2Y0Mzg3NTgtMDhlYS00N2EwLTkzOTItYjQ2YWM0ZjdlODdkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA2NDEzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg2NmFjYzc5NzQ5MWE3MjJmYTFmNzlhMGUxMGMwZjVhYjY1MTJkNDA0YmU2YTU1M2EwYThiZTI2YTNiYjNlMzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wFS20Ut7xOQCKEd-8qIr6oiENUgqMa3qsnY9sQywed4)
Benoit's version:
![Screenshot 2023-09-12 at 6 06 58 PM](https://private-user-images.githubusercontent.com/60892553/267487670-6a520bc7-8533-447d-8530-29a916faf60c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2ODgzOTYsIm5iZiI6MTczOTY4ODA5NiwicGF0aCI6Ii82MDg5MjU1My8yNjc0ODc2NzAtNmE1MjBiYzctODUzMy00NDdkLTg1MzAtMjlhOTE2ZmFmNjBjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA2NDEzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM2OTM1ZTE3ZjczMDkzZjIzOWJmN2RiNjZkYmRhMTlkNDg4MWNkNWFjZDAzMTRlM2EwZGQ3Y2IxZGE5ZThmYWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yZXeIQ9ZzAC9x2VIpBfPtFi51QAs8vWJ1XDCN_lUWMM)
System information
The contents of your
![Screenshot 2023-09-12 at 6 08 52 PM](https://private-user-images.githubusercontent.com/60892553/267487907-eba83a92-5f54-4d8c-bc0a-f89127693c20.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2ODgzOTYsIm5iZiI6MTczOTY4ODA5NiwicGF0aCI6Ii82MDg5MjU1My8yNjc0ODc5MDctZWJhODNhOTItNWY1NC00ZDhjLWJjMGEtZjg5MTI3NjkzYzIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA2NDEzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTllYTZmYjVhNzhlNTkyYjdjMTQ0NWE5NzIxNDQwZmJiYTVlYTU5NzlkMDM3NWZmMmQ2MWU1ZjI5MjNlM2I0MDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.stktuHbXnIhGD7hiK3P01QZuG0-94Fdbh--arW4qf2E)
packages.yml
file:Which database are you using dbt with?
The output of
dbt --version
:1.6.0 - dbt Cloud
The operating system you're using:
Mac / Arc Browser
The output of
python --version
:Additional context
It's fine if things now need to be wrapped in
if execute
, but the README should reflect!Are you interested in contributing the fix?
Would love to, but don't have time to solution if needed 🥲
The text was updated successfully, but these errors were encountered: