-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with the distributed_table materialization #179
Comments
This is a new, experimental feature so I suspect it's a bug. Any thoughts @gladkikhtutu? |
can you please provide dbt.log? The error was returned by ClickHouse, guess we need to know what exactly the query looks like. |
Hello @gfunc, thanks for your attention, here the log extracts you required:
The file
(You can reproduce my scenario by replacing the S3 file by any other data source.) |
I will try to reproduce this with the NYC taxi data example. Looks like sth is broken before the actual SQL run. |
@gfunc Exactly, the target/run/... file is complied to empty, maybe there is a wrong when/if condition in a macro file. BTW, You can reproduce it with just an existing clickhouse table as well. |
raised a merge request for this specific case. In the meanwhile creating test cases for distributed materializations. |
Hi @genzgd , before I start to get distributed materialization tested, I started off trying to run unit tests with Please let me know your thoughts on this :) |
@gfunc @genzgd I made some comments in the PR. When I disable the following bloc in dbt/include/clickhouse/macros/adapters.sql {%- if adapter.get_clickhouse_cluster_name() is not none and obj_types == 'TABLES' %}
{% do run_query("SYSTEM SYNC REPLICA " + on_cluster_clause() + target_relation.schema + '.' + target_relation.identifier) %}
{%- endif %}
|
@zli06160 Yes, I've noticed this also when trying pytest with {%- if adapter.get_clickhouse_cluster_name() is not none and obj_types == 'TABLES' and 'Replicated' in engine_clause() %}
{% do run_query("SYSTEM SYNC REPLICA " + on_cluster_clause() + target_relation.schema + '.' + target_relation.identifier) %}
{%- endif %} It seems like the assumption for the purpose of using a ClickHouse cluster within this repo is to replicate data (Replicated table engines). |
@gfunc There is another problem: the table (edit: I deactivated completely the bloc |
Here the log, always with the initial sql file.
|
FYI, I added my comments in the PR #180. |
PR merged into 1.4.8 release. |
Hello everyone, I am not 100% sure if this is a bug or because I did not correctly use the connector.
table
andview
materializations.Describe the bug
Here my table definition
event.sql
: it takes a parquet file from s3, then creates the table with the configurations.😊The first
dbt run
works well, the table is correctly created on my clickhouse cluster.😭When I do
dbt run
again, it does not work any more:The file
target/run/dbt_project_name/models/event.sql
is empty;The file
target/compiled/dbt_project_name/models/event.sql
contains theselect * from s3
query;Steps to reproduce
dbt run --select models/event.sql
: Completed successfully.😊dbt run --select models/event.sql
again: ERROR!😭dbt run --select models/event.sql
again: SAME ERROR!😭dbt run --select models/event.sql
again: SAME ERROR!😭dbt run --select models/event.sql
: Completed successfully. 😊Configuration
Environment
1.4.6
.1.4.7
and same problem for previous versions.1.4.7
ClickHouse server
23.3.1
Is it a bug?
Or something under development?
Or something wrongly set in my
config
clause?Thanks in advance.
The text was updated successfully, but these errors were encountered: