I have created a table in Databricks
create table TabA (latitude float, longitude float, col1 string,col2 string)
utils.executequery( """ update TabA set col1 = ST_Envelope(col2)""" ) I tried converting this output as string but getting error as _tostring() not supported
utils.executequery(""" optimize TabA """)
utils.executequery( """ update TabA set latitude = col1.Lat""" )
utils.executequery(""" optimize TabA """)
utils.executequery( """ update TabA set longitude= col1.Long""" )
utils.executequery(""" optimize TabA """)
I am getting the error
col1#22613: need struct type but got string
I tried casting the "col1" as string, but I was not able to solve this exception. How do I solve it?