cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Cast string to decimal

_Raju
New Contributor II

Hello, can anyone help me with the below error.

I'm trying to cast the string column into decimal. When I try to do that I'm getting the "Py4JJavaError: An error occurred while calling t.addCustomDisplayData. : java.sql.SQLException: Status of query associated with resultSet is FAILED_WITH_ERROR. Numeric value 'WVL383' is not recognized Results not generated." error.

The dataframe and error details are attached.

1 REPLY 1

_Raju
New Contributor II

Hi Kaniz,

Thank you for your response.

I',m expecting that the new column should be populated as NULL after the decimal conversion, if it has any characters as below example. But it is not happening when I use the same casting in my original file.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group