1

Is it possible to convert CSV to JSON using built-in/managed/3rd party template, without using Azure Function via Azure Logic App?

Below is using Azure Function, which is generated automaticately. However, I cannot find the link like what it mentions. Ideally, no Azure function is required.

http://blogs.recneps.org/post/Processing-a-flat-file-with-Azure-Logic-Apps

https://social.msdn.microsoft.com/Forums/en-US/e0ea1adc-1979-44df-a4d1-52290338bc78/transform-csv-in-logic-app?forum=azurelogicapps

Below, No CSV to JSON available.

https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-enterprise-integration-liquid-transform

2
  • have a look at this article: learn.microsoft.com/en-us/azure/logic-apps/… Commented Jun 15, 2019 at 8:07
  • Some limitations at the moment, e.g. *Runs in JavaScript.*Finishes running in five seconds or fewer. *Handles data up to 50 MB in size. Ideally with support for C# Commented Jun 16, 2019 at 1:02

1 Answer 1

3

I will admit this is not my proudest work but it seems to work fairly well. I was able to turn a CSV file from my onedrive into JSON objects.

//Updated with less variables, splits, set and replaces actions

Input

Input

Output(second object, first object and last needs to be purged) Output

How? A lot of steps that could possibly be removed and merged but. Using splits and replace actions I could single out each line and down the line create a JSON object. I was going first for an array but eventually, it was not that hard to make it into a JSON object. Not entirely sure how it works with null values.

This is probably not the best way to handle this, drawbacks here is that it is a lot of actions, the first object is the headers and that needs to be removed, there will also be a very last object that is just null(which is fine).

Entire schema

Variables

Concurrency set to 1 here For each row For each item on row

Sign up to request clarification or add additional context in comments.

1 Comment

Hey @AdAstra could you please retype the split and replace expressions once again? It isn't clear in the screenshot. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.