简体   繁体   English

如何使用 azure 数据工厂从 sql 数据库中删除记录

[英]How to delete records from a sql database using azure data factory

I am setting up a pipeline in data factory where the first part of the pipeline needs some pre-processing cleaning.我正在数据工厂中设置管道,其中管道的第一部分需要一些预处理清理。 I currently have a script set up to query these rows that need to be deleted, and export these results into a csv.我目前设置了一个脚本来查询这些需要删除的行,并将这些结果导出到一个 csv 中。

What I am looking for is essentially the opposite of an upsert copy activity.我正在寻找的基本上与更新插入复制活动相反。 I would like the procedure to delete the rows in my table based on a matching row.我希望程序根据匹配的行删除表中的行。

Apologies in advanced if this is an easy solution, I am fairly new to data factory and just need help looking in the right direction.如果这是一个简单的解决方案,请提前致歉,我对数据工厂还很陌生,只需要帮助寻找正确的方向。

Assuming the source from which you are initially getting the rows is different from the sink There are multiple ways to achieve it.假设您最初从中获取行的来源与接收器不同有多种方法可以实现它。

  1. in case if the number of rows is less, we can leverage script activity or lookup activity to delete the records from the destination table如果行数较少,我们可以利用脚本活动或查找活动从目标表中删除记录

  2. in case of larger dataset, limitations of lookup activity, you can copy the data into a staging table with in destination and leverage a script activity to delete the matching rows如果数据集较大,查找活动受到限制,您可以将数据复制到目标中的暂存表中,并利用脚本活动删除匹配的行

  3. in case if your org supports usage of dataflows, you can use that to achieve it如果您的组织支持使用数据流,您可以使用它来实现它

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

相关问题 如何使用 azure 数据工厂删除活动删除子文件夹? - How to delete sub folder using azure data factory delete activity? 使用 Azure 数据工厂将一些表从 MySQL 数据库归档到 Parquet 文件 - Data Archival of a few tables from MySQL database to Parquet file using Azure Data Factory 如何在Azure数据工厂中启用SSL连接到DB2数据库? - How to connect to DB2 database with SSL enabled in Azure Data Factory? 如何使用 VM 上的文件使用 Azure 数据工厂运行 python 脚本? - How to run python script with Azure Data Factory using files on a VM? Azure SQL 数据库之间计划的 1:1 表副本使用数据工厂而不指定表架构 - scheduled 1:1 copy of tables between Azure SQL databases using Data Factory without specifying table schema 使用数据工厂将数据从 Azure cosmos 美区迁移到欧区 - Migrate Data from Azure cosmos US region to European Region using data factory Azure数据工厂:无法将设置变量的output保存到文件/数据库中 - Azure Data Factory: Cannot save the output of Set Variable into file/Database 从Azure数据工厂调用Azure Function报404错误 - Calling Azure Function from Azure Data Factory Gives 404 Error Azure 数据工厂触发器创建使用 python - Azure data factory trigger creation using python 如何检查管道是否存在于 Azure 数据工厂中? - How to check if the pipeline exists in the Azure Data Factory?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM