Redshift table size estimates gigabytes as kilobytes. #2702
Labels
bug
Something isn't working
good_first_issue
Straightforward + self-contained changes, good for new contributors!
redshift
Describe the bug
The data catalog offers a feature to estimate table size. For Redshift tables, this estimate reports GB as KB.
I can verify this references a table that is 44 GB, not 44 KB.
/~https://github.com/fishtown-analytics/dbt/blob/03010ecde71634d11f80949018c39a63070f1008/plugins/redshift/dbt/include/redshift/macros/catalog.sql#L150
The problem behavior appears to be in this line of code where the bytes are divided by 1e6.
Steps To Reproduce
AFAICT this bug is created by adding a Redshift table to dbt and building the data catalog.
Expected behavior
It should report the correct estimate.
Screenshots and log output
I can verify this references a table that is 44 GB, not 44 KB.
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using: Docs are built with Docker image
python:3.7.7-slim-buster
. Docs are served with Docker imagenginx:1.19.0-alpine
.The output of
python --version
: 3.7.7Additional context
/~https://github.com/fishtown-analytics/dbt/blob/fb8065df2711d5f5978865a45cc0725a06e670f1/core/dbt/utils.py#L445
Noting because it's related: I'm reasonably confident the issue is not in the
format_bytes
usage.The text was updated successfully, but these errors were encountered: