Vì vậy, khi chạy từ pyspark tôi sẽ gõ vào (mà không chỉ định bất kỳ bối cảnh):Spark có thể truy cập vào bảng Hive từ pyspark nhưng không phải từ tia nộp
df_openings_latest = sqlContext.sql('select * from experian_int_openings_latest_orc')
.. và nó hoạt động tốt.
Tuy nhiên, khi tôi chạy kịch bản của tôi từ spark-submit
, như
spark-submit script.py
tôi đặt sau trong
from pyspark.sql import SQLContext
from pyspark import SparkConf, SparkContext
conf = SparkConf().setAppName('inc_dd_openings')
sc = SparkContext(conf=conf)
sqlContext = SQLContext(sc)
df_openings_latest = sqlContext.sql('select * from experian_int_openings_latest_orc')
Nhưng nó mang lại cho tôi một lỗi
pyspark.sql.utils. AnalysisException: u'Bảng không tìm thấy: experian_int_openings_latest_orc; '
Vì vậy, nó không thấy bảng của tôi.
Tôi đang làm gì sai? Vui lòng giúp
P.S. Phiên bản Spark 1.6 chạy trên Amazon EMR
Cảm ơn bạn rất nhiều! :) – Dennis