question

ShaneCossever-7055 avatar image
0 Votes"
ShaneCossever-7055 asked NguyenRadford-0841 answered

Azure Data Factory and CDATA type XML incompatibility

I have created a Copy Data activity to use my HTTP XML sink and a JSON source. In mapping, all data objects and their content come across, except for any columns that contain CDATA type formatted text from my XML response.

How can I work around this? My external API source currently only supports returning data with CDATA formatting.

Thank you

azure-data-factoryazure-logic-appsazure-stack-hub
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @ShaneCossever-7055 ,

Thanks for posting the question and welcome to Microsoft Q & A .
I am sorry but at this time the CDATA for XML is not supported in ADF .
One way i can think is that if you have the XML ingested in SQL and then use the SQLs feature read the XML , that may work out .


Thanks
Himanshu

0 Votes 0 ·

Can you please clarify what you mean by "I am sorry but at this time the CDATA for XML in ADF ."?

Also, are there any other Azure apps I could use, without having to use SQL? My data source is external, I am connecting by API...

0 Votes 0 ·

Hello @ShaneCossever-7055 ,

I have updated my comments to make it more clear . As mentioned by @YitzhakKhabinsky-0887 , did you explored the option with Logic apps ? Please do let us know if you are still blocked . If you have found a resolution please share the same with the community so that others can benefit from it .

Thanks
Himanshu

0 Votes 0 ·

I am using Logic Apps, but when the XML Data comes back, the <value> tag which contains the CDATA formatting returns the following error: BadRequest. Http request failed: the content was not a valid JSON.

When diagnosing, backend error is:
Parse error on line 1:
<value><![CDATA[{"an
^
Expecting 'STRING', 'NUMBER',

How can I fix this?





0 Votes 0 ·
Show more comments
YitzhakKhabinsky-0887 avatar image
0 Votes"
YitzhakKhabinsky-0887 answered MikeUrnun edited

Hi @ShaneCossever-7055,

You can try Azure Logic Apps. It supports XSLT transformations via Maps.
And, most important, it supports XSLT 3.0 standard.
Meaning CData sections, JSON, the whole nine yards.

P.S. Please connect with me on LinkedIn.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ShaneCossever-7055 Yes, Logic Apps would be to way to go here. Please review the following documentation and let us know if any questions: Transform XML with maps in Azure Logic Apps with Enterprise Integration Pack


0 Votes 0 ·
NguyenRadford-0841 avatar image
0 Votes"
NguyenRadford-0841 answered

I had the same problem: I was using a Copy Activity to merge XML files and found that all the CDATA content was thrown away.

I got around this by using a Data Flow to union the different files. For whatever reason (maybe because it is Spark underneath), the CDATA were not ignored in the Data Flow.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.