0

我正在尝试使用文档提供的示例代码将 Spark 数据帧转换为增量格式,但总是出现这个奇怪的错误。你能帮忙或指导吗?

df_sdf.write.format("delta").save("/mnt/.../delta/")

错误看起来像:

org.apache.spark.SparkException: Job aborted.

--------------------------------------------------------------------------- Py4JJavaError Traceback (most recent call last) <command-3011941952225495> in <module> ----> 1 df_sdf.write.format("delta").save("/mnt/.../delta/") /databricks/spark/python/pyspark/sql/readwriter.py in save(self, path, format, mode, partitionBy, **options) 737 self._jwrite.save() 738 else: --> 739 self._jwrite.save(path) 740 741 @since(1.4)
/databricks/spark/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py in call(self, *args) 1255 answer = self.gateway_client.send_command(command) 1256 return_value = get_return_value( -> 1257 answer, self.gateway_client, self.target_id, self.name) 1258 1259 for temp_arg in temp_args:

/databricks/spark/python/pyspark/sql/utils.py in deco(a, *kw)
4

3 回答 3

1

/mnt/.../delta/

不是有效路径。

于 2020-02-04T19:48:18.150 回答
0

我遇到了同样的错误,问题是我使用的是 Spark 3.0 Preview。我不得不将 spark 版本更改为 2.4,问题就解决了。

于 2020-05-18T18:56:16.800 回答
0

尝试这个:

df_sdf.write.format("delta").save("/mnt/.../delta/sdf")
于 2022-02-27T18:15:11.797 回答