简体   繁体   English

Azure 数据工厂比较和复制缺失的行

[英]Azure Data Factory compare and copy missing rows

I've got 2 tables, and I want to copy only the new rows from table A to table B.我有 2 个表,我只想将新行从表 A 复制到表 B。

So far I've declared two sources:到目前为止,我已经声明了两个来源:

  • Table A on sqlserver1 sqlserver1 上的表 A
  • Table B on sqlserver2 sqlserver2 上的表 B

Now I'm at a loss about how to say only take those rows that are missing in tableB.现在我不知道如何说只取tableB中缺少的那些行。 I've got a compound key.我有一个复合键。 In T-SQL, I'd just use a left join with multiple on statements.在 T-SQL 中,我只使用带有多个 on 语句的左连接。

  1. if you want copy data from table a to table with only new rows from table a.如果您想将表 a 中的数据复制到仅包含表 a 中的新行的表中。 you must create data flow like this.您必须像这样创建数据流。 I assume that table a is table source and table b is sink (table destination)我假设表 a 是表源,表 b 是接收器(表目标)

从表a到表b的数据流复制

  1. you can add lookup activity as below: for example "PLANT" is unique value from table A or Id_column您可以添加如下查找活动:例如“PLANT”是表 A 或 Id_column 中的唯一值在此处输入图像描述

  2. you can add lookup activity like this: add column "flag" is using to flag from that Id do you have您可以像这样添加查找活动:添加列“flag”用于从该 Id 中标记您是否有

在此处输入图像描述

  1. the last is using conditional split like this:最后一个是使用这样的条件拆分: 在此处输入图像描述

  2. the last, is you can using sink to Table B...最后,您可以使用接收器连接到表 B...

I hope my explain can help your problem.我希望我的解释可以帮助您解决问题。 I'm sory if my english is bad...如果我的英语不好,我很抱歉...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure 数据工厂 -> 查找、ForEach 和复制活动 - Azure Data Factory -> Lookup , ForEach and copy activity 使用 Azure 数据工厂更新 SQL 表中的行 - Updating rows in a SQL table with Azure Data Factory 在 Azure 数据工厂中复制数据活动后更新 - Update after a Copy Data Activity in Azure Data Factory Azure 数据工厂将数据从 XML 复制到 SQL 突触池 - Azure Data Factory copy data from XML to SQL Synapse pool 在 Azure 数据工厂预复制脚本中截断表? - Truncating tables in Azure Data Factory Pre-Copy script? 如何将 SQL 行转换为 Azure 数据工厂中的 json 对象数组? - How to convert SQL rows to an array of json objects in Azure Data Factory? 比较两个表,查找丢失的行和不匹配的数据 - Compare two tables, find missing rows and mismatched data Azure 数据工厂中的过滤器 - Filter in Azure Data Factory 每月在 Azure 数据工厂中的复制活动中自动更改日期以将数据从 SAP HANA 复制到 Azure SQLDB - Changing a Date automatically every month in copy activity in Azure Data Factory to copy data from SAP HANA to Azure SQLDB Azure 数据工厂:在 foreach 活动中复制活动后结果的顺序不一致 - Azure Data Factory: Inconsistent ordering of results after copy activity inside foreach activity
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM