简体   繁体   English

使用参数的 ADF 中 SQL 数据集的不同架构名称

[英]Different Schema name for SQL datasets in ADF using parameters

We have tables under different schema in same db in Azure SQL DB.我们在 Azure SQL 数据库中的同一数据库中有不同模式下的表。 eg.例如。 QA.Mytable and Prod.Mytable. QA.Mytable 和 Prod.Mytable。 so to manage this in Azure data factory for different environments, is there any way?所以要在 Azure 数据工厂中针对不同的环境进行管理,有什么办法吗?

or is it better to create a dedicated DB for each environments?还是为每个环境创建一个专用数据库更好?

I am not able to use global parameters in datasets.我无法在数据集中使用全局参数。

@Agratu: You won't be able to use Global Parameters in a dataset, you can use them in an activity inside an ADF pipeline @Agratu:您将无法在数据集中使用全局参数,您可以在 ADF 管道内的活动中使用它们

Also, I would recommend to separate databases for each environment as a best practice另外,我建议最好将每个环境的数据库分开

But still if you need to keep it in the same DB, then you can pass the schema and table name to your dataset dynamically但是如果你需要将它保存在同一个数据库中,那么你可以动态地将模式和表名传递给你的数据集

For that you need to first add parameters in your dataset for Schema name and table name and then use it in the dataset为此,您需要首先在数据集中为架构名称和表名称添加参数,然后在数据集中使用它

在数据集中添加参数

在数据集中使用参数

In the pipeline whenever you will select the dynamic dataset then it will prompt you to add the schema and table name in the pipeline (if you are going to keep different pipeline for different schema)在管道中,只要您将 select 动态数据集,它就会提示您在管道中添加架构和表名(如果您要为不同的架构保留不同的管道)

If you need to use same pipeline for both schemas then you need to create a metadata / config table and use Lookup and Foreach in ADF to load the tables如果您需要为两个模式使用相同的管道,那么您需要创建一个元数据/配置表并在 ADF 中使用 Lookup 和 Foreach 来加载表

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

相关问题 SQL 在 ADF 中使用脚本活动进行查询 - SQL Query using script activity in ADF adf 映射参数到 json 文件保存类型 - adf mapping parameters to json file keeping type Azure SQL 数据库之间计划的 1:1 表副本使用数据工厂而不指定表架构 - scheduled 1:1 copy of tables between Azure SQL databases using Data Factory without specifying table schema 如何使用 AWS CDK 从两个不同的账户获取 SSM 参数 - How to fetch SSM Parameters from two different accounts using AWS CDK 使用 GORM 的模式不支持的关系 - Unsupported relations for schema using GORM Jenkins参数使用groovy - Jenkins parameters using groovy 如何使用 adf 或 logicaapp 将存储在 azure blob 存储中的图像转换为 base 64 - How to convert an image stored in azure blob storage to base 64 using adf or logicaapp 使用数据流将 excel 文件加载到 ADF 中的 cosmos dB 时,列被删除 - Columns gets removed while loading an excel file to cosmos dB in ADF using data flow 如何使用变量将字符串类型转换为 adf 中的 int 类型 - how to convert stringtype to int type in adf using variables 按名称将参数传递给 BigQuery 存储过程或 function - Pass parameters by name to BigQuery stored procedure or function
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM