1

I have created a Logic App that converts XML to JSON

LogicAppProcess

This work 'great', no issues in that part of the process - however, this retains some ? and @ symbols within some of the column names. This is then not working downstream in an Azure Data Flow as the @ symbol is being picked up a parameter..

enter image description here

{"code":"BadRequest","message":"ErrorCode=InvalidTemplate, ErrorMessage=Unable to parse expression 'version'","target":"pipeline/PL_XXXX/runid/XXXX","details":null,"error":null}

Any ideas as to how i can either replace the ? and @ symbols at the first point in the process (Logic App) or accommodate for these in the Data Flow?

This is how the Data Flow code sees the error in the Script element - the ?xml is not throwing an error but the first @ is, and shows @version as the error

"script": "source(output(\n\t\t{?xml} as ({@version} as string, {@encoding} as string),\n\t\trss as ({@version} as string, {@xmlns:cisAbstract} as string...
0

1 Answer 1

0

You can use the replace() function in your logic app to replace the ? and @ with null string "". If your data is not string type(such as json object or array or any other type), you can use string() function to convert them to string first and then do the replace() function. Shown as below expression:

replace(replace(string(<your data>), '@', ''), '?', '')
Sign up to request clarification or add additional context in comments.

Comments

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.