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
Anonymous
Not applicable

"No columns were found" after getting data from API

Hello, Power Friends,

 

I`m trying to get data from an API, The importation process goes with no problem, but when I tried to expand the "column1" I had the message "No columns were found".

When I use the browser to see the XMLS contant, I see the sample bellow:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<ArrayOfFerias xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Ferias>
<nomeColaborador>MICHAEL JACKSON</nomeColaborador>
<celula>486</celula>
<codigoColigada>1</codigoColigada>
<numeroMatricula>462</numeroMatricula>
<dataInicioPeriodoAquisitivo>2017-11-26T00:00:00</dataInicioPeriodoAquisitivo>
<dataFimPeriodoAquisitivo>2018-11-25T00:00:00</dataFimPeriodoAquisitivo>
<dataAdmissao>2001-11-26T00:00:00</dataAdmissao>
<flgPeriodoPerdido>N</flgPeriodoPerdido>
<numeroFaltasPeriodo>0</numeroFaltasPeriodo>
<dataInicioGozoFerias>2019-09-09T00:00:00</dataInicioGozoFerias>
<dataFimGozoFerias>2019-09-29T00:00:00</dataFimGozoFerias>
<numeroDiasGozo>20</numeroDiasGozo>
<numeroDiasAbonoFerias>10</numeroDiasAbonoFerias>
<dataPagamentoFerias>2019-09-05T00:00:00</dataPagamentoFerias>
</Ferias>
<Ferias>
<nomeColaborador>MICHAEL JACKSON</nomeColaborador>
<celula>486</celula>
<codigoColigada>1</codigoColigada>
<numeroMatricula>462</numeroMatricula>
<dataInicioPeriodoAquisitivo>2018-11-26T00:00:00</dataInicioPeriodoAquisitivo>
<dataFimPeriodoAquisitivo>2019-11-25T00:00:00</dataFimPeriodoAquisitivo>
<dataAdmissao>2001-11-26T00:00:00</dataAdmissao>
<flgPeriodoPerdido>N</flgPeriodoPerdido>
<numeroFaltasPeriodo>0</numeroFaltasPeriodo>
<dataInicioGozoFerias>1900-01-01T00:00:00</dataInicioGozoFerias>
<dataFimGozoFerias>1900-01-01T00:00:00</dataFimGozoFerias>
<numeroDiasGozo>0</numeroDiasGozo>
<numeroDiasAbonoFerias>0</numeroDiasAbonoFerias>
<dataPagamentoFerias>1900-01-01T00:00:00</dataPagamentoFerias>
</Ferias>

When I save the XML content on the disk and import the file using the XML option, everything works.

Is there any addcional procedure to make it works or a XML formatting problem?
 
Thanks
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Just to let you know: the problem with the API was the version missing parameter.

Thanks for the support

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

I'd like to suggest you create a blank query with XML and Web connectors to get data from specific API:

let
   Source=Xml.Document(Web.Contents("https://api.xxxxx.com", [Headers=[Authorization=xxxxxxxxx],RelativePath="/v1/xxxxxxx"]))
in
    Source

If above not help, please share more detail information to help us clarify your scenario.

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Just to let you know: the problem with the API was the version missing parameter.

Thanks for the support

SteveCampbell
Memorable Member
Memorable Member

In Query Editor, click the settings next to your Source (or the step rthat runs the API). If you cannot disaply this, try making the query again and have the following settings:

Change the "Open File As" to XML tables

 

Annotation 2019-10-07 092119.png

 

 

Appreciate your Kudos
Connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



Anonymous
Not applicable

I've tried it, but had the message: "DataFormat.Error: Xml processing failed. Either the input is invalid or it isn't supported. (Internal error: Data at the root level is invalid. Line 1, position 1.)
Details:
[Binary]"

 

Any new idea? Thanks for your time.

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.