Error in SQL statement: AnalysisException: Table or view not found:
I write in python but wanted to write something in SQL but there is an error I cannot understand. I cannot see anything wrong in my code. Please help me. spark.sql("create table happiness_perm as select * from happiness_tmp"); %sql select Country, count(*) from happiness_perm group by Country I tried use my data freame df_happiness instead happiness_perm and still I receive this: Error in SQL statement: AnalysisException: Table or view not found: happiness_perm; line 1 pos 30; 'Aggregate ['Country], ['Country, unresolvedalias(count(1), None)] +- 'UnresolvedRelation [happiness_perm], [], false
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.