How to execute .sql file in spark using python

前端 未结 3 1288
广开言路
广开言路 2021-01-18 07:25
from pyspark import SparkConf, SparkContext
from pyspark.sql import SQLContext

conf = SparkConf().setAppName(\"Test\").set(\"spark.driver.memory\", \"1g\")
sc = Spa         


        
3条回答
  •  清歌不尽
    2021-01-18 07:54

    I'm not sure will it answer your question. But if you intend to run query on existing table you can use,

    spark-sql -i 
    

    One more thing, if you have pyspark script you can use spark-submit details in here.

提交回复
热议问题