cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AAlcala
Frequent Visitor

Unexpected error importing data with power query

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

1 ACCEPTED SOLUTION

Accepted Solutions

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....

View solution in original post

10 REPLIES 10
EricRegnier
Super User
Super User

Hi, would it be possible to paste the whole error (texto de mashup)? Thanks!

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.

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.

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

caption.png

Here's the file.

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

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!

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?

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.

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....

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (4,029)