handsome-football-66174
02/06/2023, 5:26 PMastonishing-answer-96712
02/06/2023, 5:38 PMhandsome-football-66174
02/06/2023, 6:47 PMhandsome-football-66174
02/06/2023, 6:53 PM"""Metadata Ingestion DAG"""
from datahub.ingestion.run.pipeline import Pipeline
import csv
import logging
if __name__ == '__main__':
env = "development"
PIPELINE_CONFIG = {
"source": {
"type": "s3",
"config": {
"env": "PROD",
"profiling":{
"enabled":"false"
},
"path_specs": [
{"include":"s3a://<path>"}
],
"aws_config": {
"aws_access_key_id": "<awsseretkey>",
"aws_region": "us-east-1",
"aws_secret_access_key": "<awssecretaccesskey>"
}
}
},
"transformers": [
{
"type": "set_dataset_browse_path",
"config": {
"path_templates": [
"<browsepath>"
]
}
},
"sink": {
"type": "datahub-rest",
"config": {
"server": GMS_SERVER_DICT[env]
}
}
}
print(f" Pipeline config is {PIPELINE_CONFIG}")
pipeline = Pipeline.create(PIPELINE_CONFIG)
pipeline.run()
logging.warning('Pipeline Execution!')
pipeline.raise_from_status()
print(pipeline.log_ingestion_stats())handsome-football-66174
02/06/2023, 7:04 PMastonishing-answer-96712
02/06/2023, 7:41 PMprofile_patterns.allow and profile_patterns.deny for regex filtering https://datahubproject.io/docs/generated/ingestion/sources/s3#config-detailshandsome-football-66174
02/10/2023, 5:28 PM