Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save saumalya75/8521a68d90cbb700e43cbae8a5366fd6 to your computer and use it in GitHub Desktop.
Save saumalya75/8521a68d90cbb700e43cbae8a5366fd6 to your computer and use it in GitHub Desktop.
Read Configuration File
try:
CONFIG_FILE_NAME = "dag_configuration_demo.json"
CONFIG_DB_KEY = "configurable_data_pipeline_demo_config"
config_file = Path(__file__).with_name(CONFIG_FILE_NAME)
with config_file.open() as config_data:
pipeline_config = json.loads(config_data.read())
except Exception as e:
print("Something went wrong while reading the dag configuration: " + str(e))
print("~" * 100)
traceback.print_exc(file=sys.stdout)
print("~" * 100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment