Created
May 29, 2020 06:21
-
-
Save saumalya75/8521a68d90cbb700e43cbae8a5366fd6 to your computer and use it in GitHub Desktop.
Read Configuration File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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