Derived column pattern Objective : We have two sample datasets with different Schema formats. Our Objective is to load different schema format files present in the source with single pipeline as it is not possible for us to segregate the source files based on their schemas. The data is loaded into a database with structure as attached. We have created a pipeline in Azure Data factory that connects to the source and loads all the csv present in the source with the derived column transformation. The source and sink both have Schema drift enabled and column pattern is used in the derived column transformation.
Issue : The pipeline works fine and maps the target column correctly if only A type or only S type files are present in the source but if both files are mixed then the mapping on the target table is not happening correctly. Schema drift is not working when source has two different source file mixed together. here is schema format defined with Table structure.
Schema A Format : Filename,Cost_Type,ResourceType,Group,Subgroup,Description,Pay Class,ResourceName,Date,Hours
Schema B Format : Filename,Cost_Type,Resource Type,Group,Sub-Group,WBS Name,Activity Name,Resource Name,Date,Hours