cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Need urgent help while Trying to update the below statement from spark SQL. Getting error

Skesaram
New Contributor II

spark.sql('UPDATE kct SET ABC_basevalue = kct.ABC_KBETR * ABS(T5.UKUSA) FROM cond_azure_try_delta kct 

INNER JOIN VW_TCU_delta AS T5 ON kct.WRS = T5.TCU AND kct.ABC_konwa=t5.fc 

INNER JOIN tcu_delta t ON(kct.WRS=t.FC) WHERE kct.marked="1"')

5 REPLIES 5

Debayan
Esteemed Contributor III
Esteemed Contributor III

Hi, Could you please provide the error or the screenshot?

Skesaram
New Contributor II

imagegetting the above error. Thanks in advance

Skesaram
New Contributor II

result_df = kunnr_azure_try.alias("kct").join(VW_T_AdjDefaultPrice.alias("t5"), (kunnr_azure_try.WAERS==VW_T_AdjDefaultPrice.TURR) & (kunnr_azure_try.ZW00_KONWA==VW_T_AdjDefaultPrice.FURR) , "inner").join(tcurr, tcurr.FCURR==kunnrmatnr_cond_azure_try.WAERS,"inner").where(tcurr.TYPE_RATE=="original").where(kunnrmatnr_cond_azure_try.marked==1).select("ZW00_kbetr","ZW00_basevalue",(tcurr.UKURS.alias("TUCURS")),"ZWF1_kbetr","ZWF1_value","ZW00_KPEIN")

result_df.display()

did a work around it worked for me...

Anonymous
Not applicable

Hi @sreekanth kesaram​ 

Hope everything is going great.

Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you. 

Cheers!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.