Logic App Standard — Working with Flat Files — Part II
Last time when i was working with flat file transformations using Logic Apps standard, there was a gap in Logic Apps standard where Flat file decoding and encoding was not available. To work around that gap, the adopted approach was to build a consumption logic app and secure it with API management and managed identities. You can find the details in the below article.
Logic App Standard — Working with Flat Files
How to transform flat files from delimited to positional or any other type of files using Logic Apps standard
Logic Apps standard — XML transformation issue
Logic App, XML Transformation issue, Special characters, Disable the byte order mark
There was a feature request with Microsoft and it was advised that they were working on it. Not long after when there was a requirement to transform a flat file to xml, stumbled on to these surprises at the Logic App standard’s actions palette.
Good thing is these are built-in actions, but one thing to note is these are still in preview.
This will eliminate the need to create consumption logic app just to transform flat files.
This will also eliminate the need to have Integration Accounts to store maps and schemas as Logic App standard supports storing maps and schemas within the app itself.
Now let’s look at how to use these actions and transform flat files.
a. Create schemas for the flat files you are working with
b. Create maps to transform the file from source format to destination format
c. Upload the schemas and maps to the logic apps standard under artefacts
It is well documented by Microsoft and its available in the link below:
Add XSLT maps to transform XML in workflows - Azure Logic Apps
To convert XML between formats, your logic app workflow can use maps with the Transform XML action. A map is an XML…
a. In the workflow, when the flat file is received and ready to transform use the flat file decoding action to convert the message to xml. choose the right schema, this will convert the flat file to an intermediary xml instance.
b. Use transform xml action to convert the flat file input to target schema. Choose the appropriate map to perform this action. This will generate an intermediary xml representation of the target flat file.
c. next choose flat file encoding action to convert the xml output from transform action to convert to a flat file by choosing the appropriate target schema.
This really helps to complete the stories of working with flat files and xml files in the enterprise application integration area. Microsoft is also actively working on the gaps and feature requests from users in a lightning speed.