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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SamTrexler
Helper IV
Helper IV

XML import truncates text in columns

I am importing multiple XML files from a directory. There are 14 files in the directory I am using for testing, and each file is very small. All of them have the same structure, and all appear to import correctly using Xml.Tables(File.Contents("mypath\myfile.xml")).

 

However for one particular file, when I expand one of the tables that contains a column I need, I find truncated text in the column, and that is throwing off the rest of the processing. Only the first 1,054 characters are retrieved and this is followed by an ellipsis (three dots). Examining the file, the XML node contains 4,496 characters - not much text, there should be no reason to truncate it.

 

Removing the XML.Tables() and looking at the data retrieved by File.Contents shows all 4,496 characters between the node start and end tags. So the truncation of this column (which has type text) is being done by the XML.Tables function. And XML.Document does the same thing.

 

The file contains 129 lines of text for this node, and the import is truncating after 33 lines of text.  The only odd thing I can see is that line 127 is exceptionally long - 508 characters - but the text is truncated long before reaching this line of text.

 

Why is the text getting truncated in this column? And what can I do to get the full text?

 

Thanks.

1 ACCEPTED SOLUTION
SamTrexler
Helper IV
Helper IV

Sorry, this seems to have been an artifact of my testing. Now that I have returned to a more normal set of steps, it is working correctly. Oh, how I wish I could step through a function using "Applied Steps"!

 

Will delete this topic.

View solution in original post

1 REPLY 1
SamTrexler
Helper IV
Helper IV

Sorry, this seems to have been an artifact of my testing. Now that I have returned to a more normal set of steps, it is working correctly. Oh, how I wish I could step through a function using "Applied Steps"!

 

Will delete this topic.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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