Tag Archives: createOrReplaceGlobalTempView

SparkSQL Use DataSet to Operate createOrReplaceGlobalTempView Error

The error information is as follows

Cause analysis

The main reason is that the hive configuration file is not configured in spark. Copy the hive-site.xml file of hive configuration to the spark directory

mv ../hive/conf/hive-site.xml ../spark/conf/hive-site.xml

explain:

If a JDBC error is reported, you also need to copy the MySQL jdbc driver under ../hive/lib to the ../spark/jars directory

The jar package MySQL connector is in hive’s lib directory, and the path where spark stores Jia package is in jars directory

result