Skip to content

if customized schema is used the redshift macro writes the admin views in the wrong schema #39

@misteliy

Description

@misteliy

Describe the bug

If we use:
{{
config({
"materialized":"table",
"schema": "raw",
"sort": "load_dts",
"dist": "all",
"comprows": 1000,
"post-hook": [
"{{ redshift.compress_table(this.schema, this.table, drop_backup=True) }}"
]
})
}}

the schema field is not getting picked up by the redshift.compress_table expression and hence writing to the wrong schema

Steps to reproduce

Please use provided config for a model

Expected results

should use the same schema as passed in the config clause

Actual results

using the default schema as provided in the profiles.yml

Screenshots and log output

If applicable, add screenshots or log output to help explain your problem.

System information

The contents of your packages.yml file:

Which database are you using dbt with?

  • postgres
  • [x ] redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:

<output goes here>

The operating system you're using:

The output of python --version:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions