尝试将pysparkDataframedf作为新记录插入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)
这里有什么问题?
1条答案
按热度按时间hgb9j2n61#
你有缩进问题