web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Unexpected error impor...
Power Apps
Answered

Unexpected error importing data with power query

(0) ShareShare
ReportReport
Posted on by 17

I'm trying to read a text file stored in Sharepoint with a data flow. My query seems to be OK, but when saving the query I get an Unexpected Error. Anyone kwnows what can be happening?

Succesfuly imported and transformed file from SharepointSuccesfuly imported and transformed file from Sharepoint

Unexpected errorUnexpected error

I have the same question (0)
  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at
    Hi, would it be possible to paste the whole error (texto de mashup)? Thanks!
  • AAlcala Profile Picture
    17 on at

    Here it is:

    caption4.PNG

     

    Session ID: 3ca81d7f-422a-47cd-937c-63de7ed0697f
    
    
    
    Mashup text:
    
    
    
    section Section1;
    shared DatosBloomberg = let
    Origen = SharePoint.Files("https://gasnatural.sharepoint.com/sites/Ofertas_gas_personalizadas/", [ApiVersion = 15]),
    Navegación = Origen{[Name = "UltimoFichero.txt", #"Folder Path" = "https://gasnatural.sharepoint.com/sites/Ofertas_gas_personalizadas/Documentos compartidos/General/Fuentes de datos/Bloomberg/"]}[Content],
    #"Texto importado" = Lines.FromBinary(Navegación, QuoteStyle.None),
    #"Elementos superiores quitados" = List.Skip(#"Texto importado", 35),
    #"Elementos inferiores quitados" = List.RemoveLastN(#"Elementos superiores quitados", 3),
    #"Convertido en tabla" = Table.FromList(#"Elementos inferiores quitados", Splitter.SplitTextByDelimiter(";"), null, null, ExtraValues.List),
    #"Columnas quitadas" = Table.RemoveColumns(#"Convertido en tabla", {"Column16"}),
    #"Encabezados promovidos 1" = Table.PromoteHeaders(#"Columnas quitadas", [PromoteAllScalars = true]),
    #"Columna duplicada" = Table.DuplicateColumn(#"Encabezados promovidos 1", "SECURITIES", "SECURITIES - Copia"),
    #"Columna duplicada 1" = Table.DuplicateColumn(#"Columna duplicada", "LAST_UPDATE", "LAST_UPDATE - Copia"),
    #"Columna duplicada 2" = Table.DuplicateColumn(#"Columna duplicada 1", "SECURITIES - Copia", "SECURITIES - Copia - Copia"),
    #"Columnas combinadas" = Table.CombineColumns(#"Columna duplicada 2", {"SECURITIES - Copia", "LAST_UPDATE - Copia", "SECURITIES - Copia - Copia"}, Combiner.CombineTextByDelimiter("_", QuoteStyle.None), "Id"),
    #"Tipo de columna cambiado con configuración regional" = Table.TransformColumnTypes(#"Columnas combinadas", {{"PX_OPEN", type number}, {"SECURITIES", type text}, {"ERROR CODE", Int64.Type}, {"NUM FLDS", Int64.Type}, {"PX_LOW", type number}, {"PX_HIGH", type number}, {"PX_LAST", type number}, {"FUT_MONTH_YR", type date}, {"PX_VOLUME", type number}, {"PX_CLOSE_1D", type number}, {"PX_CLOSE_5D", type number}, {"PX_CLOSE_1M", type number}, {"PX_CLOSE_1YR", type number}, {"LAST_UPDATE", type date}, {"PRICE_LAST_TIME", type time}}, "en-US")
    in
    #"Tipo de columna cambiado con configuración regional";

     

    I tried from onedrive instad of sharepoint, same error. And this query works perfectly in PowerBI

    Tried chrome and Internet Explorer. Tried security settings to lowest. I can't think on anything else to try!

     

    Thanks.

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Just to get a bit more details, this brakes at the Power Query window where you perform your transformation or when you load the data in CDS? Can you share a sample of your file (remove sensitive data) and I can test from my side?

     

    Note: Power Query in Dataflows is a countdown lighter version of Power Query in PowerBI so some feature that you are trying to use might not be supported in Dataflows.

  • AAlcala Profile Picture
    17 on at

    The query seems to be OK, I'm getting the exected result. The error comes after clicking 'Next'.

    caption.png

    Here's the file.

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Thank @AAlcala! So I just tried it and it worked. Here's the file I uploaded, I removed all the metadata before and after.

     

    2020-04-13_20-12-43.png

  • AAlcala Profile Picture
    17 on at

    And were you able to carry on until the end? I actually got to that point the first time and then got the error at the last step. How did you upload the file? Sharepoint or other way?

    Thanks!

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Yes, worked until the end. I loaded it to a new entity and uploaded the file to SharePoint (OneDrive is the same as it's a SharePoint backend).

    Try creating a complete new Dataflow? Maybe yours is corrupted?

  • AAlcala Profile Picture
    17 on at

    I tried with several new dataflows, that shoudn't be the problem.

    I'm trying to create an entity without the dataflow and I'm getting permission error (You are missing the necessary privilege to create entities in this environment), maybe my problem with the dataflow is from a lack of privilege to create new entities.

  • Verified answer
    EricRegnier Profile Picture
    8,720 Most Valuable Professional on at
    Do you have the system administrator or system customizer security role assigned? If not, that’s the issue unless you have a custom security role assigned with create/update entity privileges....
  • AAlcala Profile Picture
    17 on at

    That must be the problem. Thanks for your help!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard