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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Errors in M Query output

Hi, I am trying to make an XML custom connector, so that when I connect to that file all the transformations are done.

My project name is XMLConnector
This is my XMLConnector.pq code

section XMLConnector;

[DataSource.Kind="XMLConnector", Publish="XMLConnector.Publish"]
shared XMLConnector.Contents  = (path as text) =>
       let
            Source = Xml.Tables(File.Contents(path))
       in
            Source;
// Data Source Kind description
XMLConnector = [
   Authentication = [
    Anonymous = []
],
    Label = Extension.LoadString("DataSourceLabel")
];

This is my XMLConnector.query.pq

let
    Source = XMLConnector.Contents("C:\MyFile.xml")
in
    Source

When I try to run this app, I am getting M query error as follows:

  • Data Source Kind
    File
  • Data Source Path
    C:\MyFile.xml
  • Credential Type
    Windows
  • Privacy
    None
  • Username(o)
  • Password(o)
  • IdentitySource(o)
    What should I provide in these fields?

Thanks in advance.

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

I would suggest you to refer to doc and github tutorial and submit your issue to the issues section.

https://github.com/microsoft/DataConnectors

https://docs.microsoft.com/en-us/power-query/startingtodevelopcustomconnectors

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

I would suggest you to refer to doc and github tutorial and submit your issue to the issues section.

https://github.com/microsoft/DataConnectors

https://docs.microsoft.com/en-us/power-query/startingtodevelopcustomconnectors

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.