Closed saikoneru1997 closed 2 days ago
First we need to declare the mapping for both source and sink in json format like below in table/file
"mappings": [ { "source": { "name": "deptid", "type": "String", "physicalType": "String" }, "sink": { "name": "dept_id", "type": "Int32", "physicalType": "int" }
this mapping can be put in table or json file while copying the data we can call this mapping dynamically
1.getmetadata activity to point to the folder where files are there
2.foreach activity to loop the items within the folder
@activity('Get Metadata1').output.childItems
3.within the for each activity use lookup activity(already json is defined within the table then we are reading that json)
select * from tbl_mappings where sourcefilename='@{item().name}'
4.Now use copy activity pass filename and tablename dynamically by using lookup activity outputs
lookup activity output
5.copy activity pass the dynamic json for mapping
First we need to declare the mapping for both source and sink in json format like below in table/file
"mappings": [ { "source": { "name": "deptid", "type": "String", "physicalType": "String" }, "sink": { "name": "dept_id", "type": "Int32", "physicalType": "int" }
this mapping can be put in table or json file while copying the data we can call this mapping dynamically
1.getmetadata activity to point to the folder where files are there
2.foreach activity to loop the items within the folder
@activity('Get Metadata1').output.childItems
3.within the for each activity use lookup activity(already json is defined within the table then we are reading that json)
select * from tbl_mappings where sourcefilename='@{item().name}'
4.Now use copy activity pass filename and tablename dynamically by using lookup activity outputs
lookup activity output
5.copy activity pass the dynamic json for mapping