Skip to content

Commit

Permalink
feat: migrate aspects dictionaries to dbt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Apr 8, 2024
1 parent e539c1d commit 7e0a980
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from alembic import op


revision = "0034"
down_revision = "0033"
revision = "0035"
down_revision = "0034"
branch_labels = None
depends_on = None
on_cluster = " ON CLUSTER '{{CLICKHOUSE_CLUSTER_NAME}}' " if "{{CLICKHOUSE_CLUSTER_NAME}}" else ""
Expand All @@ -18,7 +18,7 @@
def upgrade():
op.execute(
f"""
DROP TABLE IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.user_pii
DROP DICTIONARY IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.user_pii
{on_cluster}
"""
)
Expand All @@ -30,7 +30,7 @@ def upgrade():
)
op.execute(
f"""
DROP TABLE IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.course_block_names
DROP DICTIONARY IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.course_block_names
{on_cluster}
"""
)
Expand All @@ -42,7 +42,7 @@ def upgrade():
)
op.execute(
f"""
DROP TABLE IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.course_names
DROP DICTIONARY IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.course_names
{on_cluster}
"""
)
Expand All @@ -61,7 +61,7 @@ def downgrade():
## Course Names
op.execute(
f"""
DROP TABLE IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.user_pii
DROP DICTIONARY IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.user_pii
{on_cluster}
"""
)
Expand All @@ -73,7 +73,7 @@ def downgrade():
)
op.execute(
f"""
DROP TABLE IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.course_block_names
DROP DICTIONARY IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.course_block_names
{on_cluster}
"""
)
Expand All @@ -85,7 +85,7 @@ def downgrade():
)
op.execute(
f"""
DROP TABLE IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.course_names
DROP DICTIONARY IF EXISTS {{ ASPECTS_EVENT_SINK_DATABASE }}.course_names
{on_cluster}
"""
)
Expand Down

0 comments on commit 7e0a980

Please sign in to comment.