Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion snuba/admin/clickhouse/copy_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_create_table_statements(

if cluster_name:
table_statement = table_statement.replace(
db_table, f"{db_table} ON CLUSTER {cluster_name}"
db_table, f"{db_table} ON CLUSTER '{cluster_name}'"
)

table_statements.append(
Expand Down
4 changes: 2 additions & 2 deletions tests/admin/clickhouse/test_copy_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from snuba.migrations.groups import MigrationGroup

OUTCOMES_DAILY_TABLE = """
CREATE TABLE IF NOT EXISTS {db}.outcomes_daily_local_v2 ON CLUSTER test_cluster
CREATE TABLE IF NOT EXISTS {db}.outcomes_daily_local_v2 ON CLUSTER 'test_cluster'
(
`org_id` UInt64,
`project_id` UInt64,
Expand All @@ -33,7 +33,7 @@
"""

OUTCOMES_DAILY_MV = """
CREATE MATERIALIZED VIEW IF NOT EXISTS {db}.outcomes_mv_daily_local_v2 ON CLUSTER test_cluster TO {db}.outcomes_daily_local_v2
CREATE MATERIALIZED VIEW IF NOT EXISTS {db}.outcomes_mv_daily_local_v2 ON CLUSTER 'test_cluster' TO {db}.outcomes_daily_local_v2
(
`org_id` UInt64,
`project_id` UInt64,
Expand Down
Loading