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:ย 

[DATATYPE_MISMATCH.DATA_DIFF_TYPES] Cannot resolve "coalesce(VALUE, false)"

AmineDE
New Contributor II

Hi All,

i got the error below using a compute instance with any of the runtime but not with sql warehouse xsmall. How could we explain it ?

Runtime Error in model sics_business_recon_unpivoted (models\Engineering\Business\sics_business_recon_unpivoted.sql)
[DATATYPE_MISMATCH.DATA_DIFF_TYPES] Cannot resolve "coalesce(VALUE, false)" due to data type mismatch: Input to `coalesce` should all be the same type, but it's ("STRING" or "BOOLEAN"). SQLSTATE: 09; line 1346 pos 21

2 REPLIES 2

SparkJun
Databricks Employee
Databricks Employee

can you try to run this on DBSQL and see if that errors out: coalesce(CAST(VALUE AS BOOLEAN), false)? 
What's the DBR version for your cluster? 

AmineDE
New Contributor II
  • on db sql coalesce(CAST(VALUE AS BOOLEAN), false) is working without errors
  • DBR tested are 13.3 to 16, for any of them it is not working.

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