azure - Databricks 流到批处理过程
问题描述
我正在使用 Databricks,我正在享受Autoloader功能。基本上,它正在创建以微批处理方式使用数据的基础设施。它适用于初始原始表(或将其命名为青铜)。
当我有点迷失时,如何附加我的其他表格 - 分期(或将其命名为银色)。最复杂的部分是关于 staging (silver) 到 dw layer (gold) 的首要任务。使用 MERGE 命令是一种方式,但在规模上性能可能会下降。
我正在寻找为我的事实表提供流(微批处理)和批处理的最佳实践。
只是为了即我将添加我的云文件配置:
raw_df = (spark
.readStream.format("cloudFiles")
.options(**cloudfile)
.load(raw_path)
)
使用触发选项写入:(我想使用 ADF 安排作业)。
autoloader_query = (raw_df.writeStream
.format("delta")
.trigger(once=True)
.option("checkpointLocation",checkpoint_path)
.partitionBy("p_date","p_hour")
.table("raw_table")
)
#Waiting end of autoloader
autoloader_query.awaitTermination()
#Show the output from the autoloader job
autoloader_query.recentProgress
我正在寻找流到批处理的最佳实践。谢谢!
解决方案
推荐阅读
- node.js - yarn pnp 回退到默认要求
- php - 类/特征/接口是否有任何可定制的嗅探属性?
- xcode - Xcode 12 错误 - 命令 PhaseScriptExecution 失败,退出代码为非零
- python - 如何使用 Python 迭代 csv 并仅获取某些列?
- javascript - jquery如何使用AJAX数据显示地图?
- c++ - 根据第一个字符值对字符串数组进行排序
- javascript - 在 .vue 文件之间共享一个 js-class
- scala - Scala中的转置
- wpf - 如何在WPF中将“ResourceDictionary”设置为“Window”的内容
- java - Proguard Maven 插件忽略 Injar Jar 名称