dbt-clickhouse icon indicating copy to clipboard operation
dbt-clickhouse copied to clipboard

Parameter 'Alias' doesn't affect local tables if distributed materialized is used.

Open ignashkin opened this issue 2 years ago • 2 comments

Parameter 'Alias' doesn't affect local tables if distributed materialized is used.

Steps to reproduce

  1. Create model with name 'test'
  2. Set follow parameters: {{ config( alias='alias_for_test_table', materialized='distributed_incremental', ) }}
  3. run dbt model. The distributed table will be called 'alias_for_test_table' but local table will be called 'testlocal'
  4. Change model's name to 'new_test_name'.
  5. Run dbt model with parameter --full-refresh get an error: "DB::Exception: Table new_test_namelocal doesn't exist."

Expected behaviour

The distributed table is called 'alias_for_test_table' and local table is called 'alias_for_test_tablelocal'

Configuration

Environment

Plugins:

  • clickhouse: 1.4.8 - Up to date!
  • dbt version: 1.4.7

  • dbt-clickhouse version:1.4.8

  • Python version:

  • Operating system: MacOS

ignashkin avatar Sep 15 '23 13:09 ignashkin

I will take a look.

gfunc avatar Sep 19 '23 09:09 gfunc

commit a fix with PR https://github.com/ClickHouse/dbt-clickhouse/pull/186 waiting for review

gfunc avatar Sep 19 '23 15:09 gfunc