Skip to content

Commit 6616617

Browse files
author
Tobiasz KΔ™dzierski
authored
Add env variables to PubSub example dag (#13794)
Add env variables to PubSub example dag to help parametrize system tests
1 parent 7f4c88c commit 6616617

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

β€Žairflow/providers/google/cloud/example_dags/example_pubsub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
from airflow.utils.dates import days_ago
3636

3737
GCP_PROJECT_ID = os.environ.get("GCP_PROJECT_ID", "your-project-id")
38-
TOPIC_FOR_SENSOR_DAG = "PubSubSensorTestTopic"
39-
TOPIC_FOR_OPERATOR_DAG = "PubSubOperatorTestTopic"
38+
TOPIC_FOR_SENSOR_DAG = os.environ.get("GCP_PUBSUB_SENSOR_TOPIC", "PubSubSensorTestTopic")
39+
TOPIC_FOR_OPERATOR_DAG = os.environ.get("GCP_PUBSUB_OPERATOR_TOPIC", "PubSubOperatorTestTopic")
4040
MESSAGE = {"data": b"Tool", "attributes": {"name": "wrench", "mass": "1.3kg", "count": "3"}}
4141

4242
# [START howto_operator_gcp_pubsub_pull_messages_result_cmd]

0 commit comments

Comments
 (0)