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.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now