Hello,
It is indicated in https://spark.apache.org/docs/1.6.1/sql-programming-guide.html#dataframes when Running SQL Queries Programmatically you can do: from pyspark.sql import SQLContextsqlContext = SQLContext(sc)df = sqlContext.sql("SELECT * FROM table") However, it did not indicate what should be put there as "table", for example in my case I do have couple datawarehouses and tables and one of it is: hdfs dfs -ls hdfs://localhost:9000/user/hive/warehouse/flight201601 if I use: >>> df = sqlContext.sql("SELECT * FROM flight201601") it will prompt: pyspark.sql.utils.AnalysisException: u'Table not found: flight201601;' How do I write the sql query if I want to select from flight201601? Thank you. *------------------------------------------------* *Sincerely yours,* *Raymond*