Skip to content

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

@SOVALINUX

Description

@SOVALINUX

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions