我正在运行pyspark脚本,在其中我调用蜂巢表,这是该语句的样子。 我可以在test_db数据库中看到表test_table_name。
db_name = "test_db."
count_before = spark.sql("select count(*) as count_befor, 'test_table_name' as TBL_NAME from {}test_table_name".format(db_name))
我收到以下错误代码
pyspark.sql.utils.AnalysisException: u"Table or view not found: `test_db`.`test_table_name`; line 1 pos 67;\n'Aggregate [count(1) AS count_befor#31862L, tm_driver_status AS TBL_NAME#31863]\n+- 'UnresolvedRelation `test_db`.`test_table_name`\n"
这句话我也出错了
vw_tmp_test_status.write.mode("append").insertInto({}"test_table_name".format(db_name))