cancel
Showing results for 
Search instead for 
Did you mean: 
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.

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.