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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
sondek
New Member

AWS Athena connector executes Power Query transformations in wrong order

I am using the Power BI AWS Athena Connector with Simba Athena ODBC driver to import data in Power BI Desktop. This works fine as long as I don't change the data types. I have a text column which I want to convert to an integer. The column contains some dashes ('-') though, so before I change the type of the column, I filter out the rows with the dash. In Athena itself this works fine, on other databases it works fine. In Power Query with Athena as source, however, I get the below message:

 

"OLE DB or ODBC error: [DataSource.Error] ODBC: ERROR [HY000] [Simba] [ Athena] (1040) An error has been thrown from the AWS Athena client. Error Message: INVALID_CAST_ARGUMENT: Cannot cast '000000000-' to DOUBLE ..."

 

I don't want Athena to do the casting, I would rather let Power Query do it after importing the data. I am then sure the correct order is used. How can I make sure the conversion is done in Power Query and not pushed back to Athena?

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Issue Table.StopFolding command to stop the operation being pushed back to the source. Example is given below

https://docs.microsoft.com/en-us/powerquery-m/table-stopfolding

Note - It doesn mean that you will lose the benefit of Query folding in successive operations.

 

View solution in original post

2 REPLIES 2
sondek
New Member

Thank you Vijay_A_Verma, Table.StopFolding is exactly what I needed!

Vijay_A_Verma
Super User
Super User

Issue Table.StopFolding command to stop the operation being pushed back to the source. Example is given below

https://docs.microsoft.com/en-us/powerquery-m/table-stopfolding

Note - It doesn mean that you will lose the benefit of Query folding in successive operations.

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors