Skip to content

Commit

Permalink
chore: Remove the kafka debug tables for now - they are too expensive…
Browse files Browse the repository at this point in the history
… and we are moving to kafka connect solution (#23538)
  • Loading branch information
fuziontech authored Jul 15, 2024
1 parent 2bfd439 commit 2f70270
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions posthog/clickhouse/migrations/0071_remove_kafka_debug_tables.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from posthog.clickhouse.client.migration_tools import run_sql_with_exceptions
from posthog.kafka_client.topics import KAFKA_EVENTS_JSON
from posthog.models.kafka_debug.sql import (
KafkaDebugTable,
KafkaDebugKafkaTable,
KafkaDebugMaterializedView,
)
from posthog.settings.data_stores import KAFKA_HOSTS


debug_table = KafkaDebugTable(topic=KAFKA_EVENTS_JSON)
kafka_table = KafkaDebugKafkaTable(brokers=KAFKA_HOSTS, topic=KAFKA_EVENTS_JSON)
materialized_view = KafkaDebugMaterializedView(to_table=debug_table, from_table=kafka_table)


operations = [
run_sql_with_exceptions(kafka_table.get_drop_table_sql()),
run_sql_with_exceptions(materialized_view.get_drop_view_sql()),
run_sql_with_exceptions(debug_table.get_drop_table_sql()),
]

0 comments on commit 2f70270

Please sign in to comment.