Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
geschinger
Regular Visitor

Copy Action - XML - Single Element not getting mapped / copied

We are experimenting with a pipeline to take data from XML files to SQL database and everything is working great for files with multiple elements but nothing copies over when there is a single <SalesJournal> element.

 

For example a file like this works fine.  All the mappings for the ... elements work as expected:

 

geschinger_0-1700749573714.png

Files that only have one - like this - do not throw any errors but nothing gets mapped/copied:

 

geschinger_2-1700749736558.png

If I take the same file and add another empty <SalesJournal> element then it will get mapped/copied along with a blank NULL record for the empty one.

 

Any suggestions on what I would need to adjust or what I might be doing wrong that prevents the successful mapping/copying of an XML file with the single element?

 

Thanks,

 

Greg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @geschinger ,

When I tried to repro you scenario in fabric, I am not facing this issue at my end.

My Pipeline in Fabric Data Factory -

pipeine.png

pipeine2.png

vgchennamsft_0-1701069520290.png


My Xml Sample File:

<?xml version="1.0"?>
<catalog>
   <book id="bk101">
      <author>Gambardella, Matthew</author>
      <title>XML Developer's Guide</title>
   </book>
</catalog>


Can you please re-try by creating a new connection and try to check if issue is still exists.
In case if the issue still exits please share the sample file you are using let me recheck with that file at my end.

Thank you
 

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @geschinger ,

Thanks for using Fabric Community.

As I understand you are facing issue while working with XML files.

In order to repro the scenario I have taken two scenarios to understand.

Scenario 1:

XML File Format -

vgchennamsft_0-1700830041965.png


After pipeline execution (XML to Table) -

vgchennamsft_1-1700830115515.png



Scenario 2:

XML File Format -

vgchennamsft_2-1700830167939.png

 

After pipeline execution (XML to Table) -

vgchennamsft_3-1700830216453.png

 

I cannot find any issues with these XML formats. In case if you further help please let me know.

Hello @Anonymous 

 

I have this XML file:

geschinger_0-1700832727089.png

When I run the pipeline it is status succeeded but with no rows written:

geschinger_1-1700832775013.png

 

geschinger_4-1700832897642.png

If I then add <SalesJournal></SalesJournal> to the end:

geschinger_3-1700832870300.png

and rerun the pipeline it is status succeeded and 2 rows written:

geschinger_5-1700833061032.png

 

geschinger_6-1700833076304.png

Is there something I'm doing differently and/or wrong with my mapping that would be preventing the files with only one from getting written to the DB?

geschinger_7-1700833322983.png

 

Thanks,

Greg

 

Anonymous
Not applicable

Hi @geschinger ,

Apologies for the issue you are facing.
As per my understanding you are facing this issue in Azure Data Factory but not in Fabric Data Factory.

Unfortunately Fabric Community only supports fabric related issues, incase if you want to resolve your issue related to Azure Data Factory - please raise your issue here - Ask a question - Microsoft Q&A .

But I also tried to repro your issue in Azure Data Factory for time being and I can observe it more like a bug. 

Appreciate if you could share the feedback on our feedback channel. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.

Incase if you have any more queries related Azure Data Factory Isuue, please go ahead and raise a query here.

Hope it is helpful. 

Thank you

Hello @Anonymous 

 

I'm pretty sure I am in Fabric Data Factory and not Azure Data Factory. 

 

The URL I access it from is:

geschinger_0-1700853873442.png

 

I am connecting to Azure for the SQL Database:

 

geschinger_1-1700854058945.png

My understanding is that I'm using Fabric Data Factory connecting to Azure SQL Server.  Azure Data Factory would be accessed through Azure Portal and not app.fabric.com portal, correct?

 

If this is a bug is there URL to report Fabric Data Factory issues?

 

Thanks,

Greg

 

Anonymous
Not applicable

Hi @geschinger ,

When I tried to repro you scenario in fabric, I am not facing this issue at my end.

My Pipeline in Fabric Data Factory -

pipeine.png

pipeine2.png

vgchennamsft_0-1701069520290.png


My Xml Sample File:

<?xml version="1.0"?>
<catalog>
   <book id="bk101">
      <author>Gambardella, Matthew</author>
      <title>XML Developer's Guide</title>
   </book>
</catalog>


Can you please re-try by creating a new connection and try to check if issue is still exists.
In case if the issue still exits please share the sample file you are using let me recheck with that file at my end.

Thank you
 

Hello @Anonymous 

Recreating it seems to have solved it.  Not sure how or why as I cannot find any difference between the one that fails and the newly created replacement.  But now if I run v3 (newly created pipeline) it works as expected:

geschinger_0-1701109593642.png

 

While the identical previous one still writes 0 rows in the Azure SQL DB.

 

Thanks for your help,

 

Greg

 

 

Anonymous
Not applicable

Hi @geschinger ,

Glad to know that your query got resolved. Please continue using Fabric Community for your further queries.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

November Update

Fabric Monthly Update - November 2024

Check out the November 2024 Fabric update to learn about new features.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.