You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From my understanding, field is_encoded from model redshift_admin_table_stats should indicate whether the table we're looking at has at least one encoded column. But currently the field is computed by looking in pg_attribute if any table attribute is encoded. The result is that if at least one attribute is encoded, the table appears as having at least one column encoded. Worse: in our redshift, the tableoid attribute is almost always encoded. Hence all tables have their is_encoded field set to true.
Steps to reproduce
Run the following in your redshift:
select attencodingtype, count(1)
from pg_attribute
where attname = 'tableoid'
group by 1;
And the following:
select is_encoded count(1)
from redshift_admin_table_stats
group by 1;
Expected results
We have some tables for which no column is encoded. They should appear when running the above query.
Actual results
In redshift_admin_table_stats, the tables I just mentioned are flagged as is_encoded, which should not be the case.
installed version: 0.18.0
latest version: 0.19.1
Your version of dbt is out of date! You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation
Plugins:
- bigquery: 0.18.0
- snowflake: 0.18.0
- redshift: 0.18.0
- postgres: 0.18.0
The operating system you're using:
OSX 11.2.3
The output of python --version:
Python 3.6.8
Additional context
Willing to open a PR if you confirm this should be the desired behavior. From what I understand we just need to restrict the max(attencodingtype) to attributes that have a strictly positive attnum?
The text was updated successfully, but these errors were encountered:
Describe the bug
From my understanding, field
is_encoded
from modelredshift_admin_table_stats
should indicate whether the table we're looking at has at least one encoded column. But currently the field is computed by looking inpg_attribute
if any table attribute is encoded. The result is that if at least one attribute is encoded, the table appears as having at least one column encoded. Worse: in our redshift, thetableoid
attribute is almost always encoded. Hence all tables have theiris_encoded
field set to true.Steps to reproduce
Run the following in your redshift:
And the following:
Expected results
We have some tables for which no column is encoded. They should appear when running the above query.
Actual results
In
redshift_admin_table_stats
, the tables I just mentioned are flagged asis_encoded
, which should not be the case.System information
The contents of your
packages.yml
file:Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
OSX 11.2.3
The output of
python --version
:Python 3.6.8
Additional context
Willing to open a PR if you confirm this should be the desired behavior. From what I understand we just need to restrict the
max(attencodingtype)
to attributes that have a strictly positiveattnum
?The text was updated successfully, but these errors were encountered: