Slide 23
Slide 23 text
23
Metadata driven Framework
Entity configuration
{
"entity": "Person",
"target_table": "person",
"source_system": "sap",
"source_tables": ["ZBI_I_PA0002"],
"scd2_key_columns": ["PersonNummerId"],
"scd2_table": "silver.person"
}
column_name_old,column_name_new,data_type
PERNR,PersonNummerId,INTEGER
SUBTY,Subtyp,STRING
OBJPS,ObjektIdentifikation,STRING
Entity config
Source-2-target mapping
>
Parametrized pipeline
...
catalog = dbutils.widgets.get("catalog_silver")
schema = dbutils.widgets.get("schema_silver")
domain = dbutils.widgets.get("domain_silver")
entity = dbutils.widgets.get("entity_silver")
# load entities config per domain from the config json
path_entities_config = f"file:{path}/{domain}/entities.json"
entities_config = spark.read.option("multiline", "true").json(path_entities_config)
# check if the current entity is defined in the config
entity_config = (
entities_config.filter(entities_config.entity == entity)
.collect()
)
main_notebook.py (snippet of parameter initialization)
Custom Transformations
Custom transformations per entity