将 dbfs 文件作为 databricks 中的流数据帧获取
我有一个问题,我需要为每个CSV文件中的数据链球插入一个外部表,该文件将降落到ADLS Gen 2存储中。
当我从dbutils.fs.ls()输出中获取流式数据框时,我考虑了一个解决方案,然后调用一个在foreachBatch()内创建表的函数。
我已经准备好了功能,但是我无法找到一种将目录信息流到流数据框中的方法。有人知道如何实现这一目标吗?
I have a problem where I need to create an external table in Databricks for each CSV file that lands into an ADLS gen 2 storage.
I thought about a solution when I would get a streaming dataframe from dbutils.fs.ls() output and then call a function that creates a table inside the forEachBatch().
I have the function ready, but I can't figure out a way to stream directory information into a streaming Dataframe. Do anyone have an idea on how this could be achieved?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请检查以下代码块。
Kindly check with the below code block.