Zeppelin - Cannot query with %sql a table I registered with pyspark

后端 未结 4 710
没有蜡笔的小新
没有蜡笔的小新 2021-01-12 09:36

I am new to spark/zeppelin and I wanted to complete a simple exercise, where I will transform a csv file from pandas to Spark data frame and then register the table to query

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-12 10:13

    Correct syntax would be:

    sqlContext.registerDataFrameAsTable(spark_clean_df, 'table1')
    sqlContext.sql(select * from table1 where ...)
    

提交回复
热议问题