Normally I work with Spark on Scala API, however I have to write something in pyspark, and getting error that is difficult to troubleshoot.
I am doing a join on 3 DFs :
df_c = gr_o.select("col1", "col2", "col3", "col4").join(gr_r.select("col1", "col5"), "col1", how='left').join(gr_v.select("col1", "col6"), "col1", how='left')
And when I do df_c.show() getting following error:
py4j.protocol.Py4JJavaError: An error occurred while calling o724.join.
: org.apache.spark.sql.AnalysisException: resolved attribute(s)......
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 20, in fun
File "/spark/python/pyspark/sql/dataframe.py", line 828, in join
jdf = self._jdf.join(other._jdf, on, how)
File "/spark/spark/python/lib/py4j-0.10.4-src.zip/py4j/java_gateway.py", line 1133, in __call__
File "/spark/spark/python/pyspark/sql/utils.py", line 69, in deco
raise AnalysisException(s.split(': ', 1)[1], stackTrace)
pyspark.sql.utils.AnalysisException: 'resolved attribute(s)
Source for DF is a VIEW, when I use a table instead of VIEW then it works. I am wondering if someone has experienced similar issue.