Skip to content

Fix: Inconsistent table names in Flink Kafka Sinks. #287

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

PrinceSajjadHussain
Copy link

The start_job.py file creates a Kafka sink named process_events_kafka, while aggregation_job.py creates a Kafka source with the same name process_events_kafka. This can cause confusion and potentially lead to the aggregation job reading from the sink it is writing to, which would be incorrect.

Fix:
--- a/bootcamp\materials\4-apache-flink-training\src\job\start_job.py
+++ b/bootcamp\materials\4-apache-flink-training\src\job\start_job.py
@@ -5,7 +5,7 @@
from pyflink.table import EnvironmentSettings, DataTypes, TableEnvironment, StreamTableEnvironment

def create_processed_events_sink_kafka(t_env):

  • table_name = "process_events_kafka"
  • table_name = "raw_events_kafka"
    kafka_key = os.environ.get("KAFKA_WEB_TRAFFIC_KEY", "")
    kafka_secret = os.environ.get("KAFKA_WEB_TRAFFIC_SECRET", "")
    sasl_config = f'org.apache.kafka.common.security.plain.PlainLoginModule required username="{kafka_key}" password="{kafka_secret}";'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant