Azure数据砖中的CSV摄入错误 - 文件读取错误

发布于 2025-01-26 13:23:14 字数 397 浏览 2 评论 0原文

我的任务是使用Python执行CSV文件的数据摄入。我正在使用以下代码块,并获取未找到文件的错误事件,尽管该位置是正确的。

spark.read.format("Filelocation") \
  .option("file.format", "csv") \
  .option("file.schemaLocation", "checkpoint") \
  .load("source_data") \
  .writeStream \
  .option("mergeSchema", "true") \
  .option("My_Checkpoint", "Checkpoint path") \
  .start("target")

我没有错误的线索。任何帮助都将受到赞赏。

My task is to perform data ingestion of CSV file using python. I am using the following code block and getting error of file not found eventhough the location is right.

spark.read.format("Filelocation") \
  .option("file.format", "csv") \
  .option("file.schemaLocation", "checkpoint") \
  .load("source_data") \
  .writeStream \
  .option("mergeSchema", "true") \
  .option("My_Checkpoint", "Checkpoint path") \
  .start("target")

I have no clue of the error. Any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧瑾黎汐 2025-02-02 13:23:14

这是我从您的代码块中观察到的简单读取语句错误。

spark.readStream.format("Filelocation")

在第一行中使用上面的代码块,而不是spark.read.format(“ fileLocation”),其余语句如原样。

It's a simple read statement error that I have observed from your code block.

spark.readStream.format("Filelocation")

Use the above code block in the first line instead of spark.read.format("Filelocation") and remaining statements are as it is.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文