【问题标题】:update records on target table based on unique key In dbt (data build tool)根据 dbt 中的唯一键更新目标表上的记录(数据构建工具)
【发布时间】:2021-04-28 10:47:48
【问题描述】:

如果 dbt 模型不是增量的,而只是我想根据 dbt 中的唯一键(数据构建工具)在目标表上插入和更新记录

【问题讨论】:

  • 你能提供更多细节吗?你的问题的背景,一些例子?
  • @HuiZheng 谢谢我已经解决了,我只需要建立增量模型并定义唯一键

标签: dbt


【解决方案1】:

{{ 配置( 物化='增量', unique_key='Id' ) }}

我们只需要提到uniekey和模型作为增量并编写选择查询,dbt将其转换为合并查询

【讨论】:

    猜你喜欢
    • 2023-04-08
    • 1970-01-01
    • 2014-05-22
    • 1970-01-01
    • 2020-10-26
    • 1970-01-01
    • 2021-12-24
    • 1970-01-01
    • 2023-04-11
    相关资源
    最近更新 更多