Forum Discussion

odevriend's avatar
odevriend
Frequent Visitor
9 years ago
Solved

XML with XSD schema

Dear Community members,

 

I run into the following problem.
I have a XML with a XSD schema (same like XBRL instances), when configuring the upload with a sample file all available columns are available and uploaded to Power BI.
However the problem occurs if a XML tag is not available, which is fine as the XSD says it is an optional field.

I use the following function to get the columns:

 

Table.ExpandTableColumn(#"Removed Other Columns", "header", {"fiscalYear", "startDate", "endDate", "curCode", "dateCreated", "softwareDesc", "softwareVersion"})

 

So in my specific case softwareVersion is missing, but it could also be another column

 

Can anybody tell me how to solve this issue, or idealy test against the XSD in importing the XML?

 

Many thanks in advance,

Olaf

  • Hi,

    Please find more information about XSD on the following page:

    https://en.wikipedia.org/wiki/XML_Schema_(W3C)

     

    This morning I have completely rewritten the import of the various nested tables in the XML and I do not get an error anymore. The original file was written by someone else in a previous release op PowerBI, probably that is the source of the problem as I see completely specified columns in the functions where this is not the case in the functions I (automatically) created.

    For me the problem is solved for this moment, so I will put the message to solved.

     

    However if you know some way to handle errors within one field of a nested table this might be relevant for future problems. Till now I have only been able to handle errors on the table, so if one field within this table gives an error the complete table is not expanded.

     

4 Replies