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

not_null_proportion doesn't work in Athena / Presto due to numeric type #553

Closed
1 of 5 tasks
SOVALINUX opened this issue Apr 15, 2022 · 6 comments · Fixed by #800
Closed
1 of 5 tasks

not_null_proportion doesn't work in Athena / Presto due to numeric type #553

SOVALINUX opened this issue Apr 15, 2022 · 6 comments · Fixed by #800
Labels
bug Something isn't working

Comments

@SOVALINUX
Copy link

Describe the bug

Athena fails query execution with the error SYNTAX_ERROR: line 15:56: Unknown type: numeric
There is indeed no such type in Athena / Presto
Suggestion is to use double instead
But the issue is actually wider - not_null_proportion hardcoded numeric type instead of using safe_cast with datatypes

Steps to reproduce

Use generic test not_null_proportion with Athena adapter

Expected results

Test works well

Actual results

SYNTAX_ERROR: line 15:56: Unknown type: numeric

System information

The contents of your packages.yml file:
Forked dbt-utils from v0.8.4

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: Athena)

The output of dbt --version:
1.0.4

Additional context

Are you interested in contributing the fix?

Pull Request with all these fixes will come soon

@SOVALINUX SOVALINUX added bug Something isn't working triage labels Apr 15, 2022
@villasv
Copy link

villasv commented Nov 10, 2022

Same happening with me, with dbt-utils 0.9.2 and dbt 1.3.0

@joellabes
Copy link
Contributor

Thanks @SOVALINUX - we don't actively support other warehouse platforms in this repo, but by using the cross-database macros defined in dbt core as of 1.3: https://docs.getdbt.com/reference/dbt-jinja-functions/cross-database-macros#type_numeric, you can get the warehouse-specific behaviour you need.

In other words, I'll welcome a PR that changes to using dbt.type_numeric() but not a PR that adds a Presto-specific implementation of that test.

@henriblancke
Copy link
Contributor

@joellabes opened #800 to address this

Copy link

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.

@github-actions github-actions bot added the Stale label Nov 19, 2023
Copy link

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.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2023
@brunokim
Copy link

brunokim commented Mar 8, 2024

I'm also interested in this fix (working on Trino).

@dbeatty10 dbeatty10 reopened this Apr 25, 2024
@github-actions github-actions bot removed the Stale label Apr 26, 2024
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
6 participants