【发布时间】:2021-03-04 22:17:49
【问题描述】:
尝试将 pyspark 数据帧 df 作为新记录插入到 spark 中的现有目录中
def path_exists(path):
try:
if len(dbutils.fs.ls(path)) > 0:
return True
except:
return False
if (path_exists("abfss://famli-dev-workspace@famlisandbox.dfs.core.windows.net/path_to_table")) == True:
df.write.mode("append").format("orc").insertInto("abfss://famli-dev-workspace@famlisandbox.dfs.core.windows.net/path_to_table")
但是得到了这个错误:
ParseException:
mismatched input ':' expecting {<EOF>, '.', '-'}(line 1, pos 5)
这里有什么问题?
【问题讨论】:
标签: dataframe apache-spark insert sql-insert