swift-dream-78272
03/24/2023, 1:53 PMfrom datahub.ingestion.run.pipeline import Pipeline
# The pipeline configuration is similar to the recipe YAML files provided to the CLI tool.
pipeline = Pipeline.create(
{
"source": {
"type": "mysql",
"config": {
"username": "user",
"password": "pass",
"database": "db_name",
"host_port": "localhost:3306",
},
},
"sink": {
"type": "datahub-rest",
"config": {"server": "${DATAHUB_GMS_URL}",},
},
}
)
# Run the pipeline and report the results.
pipeline.run()
pipeline.pretty_print_summary()swift-dream-78272
03/24/2023, 1:55 PMbetter-orange-49102
03/24/2023, 4:00 PMswift-dream-78272
03/27/2023, 8:00 AM*from* datahub*.*configuration*.*config_loader *import* load_config_file and load config from file path. Then even if it contains env variables defined as $SOME_KEY, it will substitute it with env variables.
Topic closed.