parseexception错误

kkbh8khc  于 2021-07-12  发布在  Spark
关注(0)|答案(1)|浏览(377)

尝试将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)

这里有什么问题?

相关问题