简体   繁体   English

ADF - 访问脚本任务活动 output 中使用的 #table 或临时表,以作为源在复制活动中使用

[英]ADF - Access #table or Temp table used in Script task activity output to be used in Copy activity as source

We have simple script consider the one below as an example.我们有简单的脚本,以下面的脚本为例。

Script:脚本:

create table #tableABC (
    col A varchar(10),
    col B varchar(10),
    col C varchar(10)
)

insert into #tableABC
    select 'A' ,'B', 'C'

The above script is considered as an SP and excepted in script task and it works.上面的脚本被认为是一个 SP 并且在脚本任务中被排除并且它有效。 but we are unable to access the #table in the following copy activity但是我们无法访问以下复制活动中的#table

select * from #tableABC;

在此处输入图像描述

Azure data factory doesn't support automatic temporary table creation and we cannot set table name with ## as starting. Azure 数据工厂不支持自动创建临时表,不能设置以##开头的表名。

  1. TempDB is the location where we can find the temporary tables. TempDB 是我们可以找到临时表的位置。 We cannot choose the temporary tables as datasets in ADF我们不能选择临时表作为 ADF 中的数据集

How to create temp tables in SQL to be used in several ADF activities? 如何在 SQL 中创建临时表以用于多个 ADF 活动?

Refer the above link, which has lot of suggestions.参考上面的链接,里面有很多建议。

https://github.com/MicrosoftDocs/azure-docs/issues/35449 https://github.com/MicrosoftDocs/azure-docs/issues/35449

Also refer the above blog for additional support.另请参阅上述博客以获得更多支持。

Note: Do not close the SQL connection session after creating temporary table.注意:创建临时表后不要关闭SQL连接session。

Alternate suggestion:替代建议:

Instead of using the Temp Tables, use the table type for easy usage.不使用临时表,而是使用表类型以便于使用。

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

相关问题 ADF - 迭代 select Output 到复制活动 - ADF - Iterative select Output to Copy activity SQL 在 ADF 中使用脚本活动进行查询 - SQL Query using script activity in ADF ADF - 如何在复制活动中禁用映射 - ADF - How to disable mapping in Copy Activity ADF 复制活动不复制所有数据 - ADF Copy Activity Not copying all data 如何在 json 中为 azure 数据工厂 (adf) 中的复制活动添加默认日期,同时在 SQL 源和接收器之间动态映射列 - How to Add default date in json for copy activity in azure data factory(adf) while dynamic mapping of columns between SQL source and sink 如何使用 .net sdk 在 Adf 复制活动中使用查询? - How to use query in Adf copy activity by using .net sdk? Azure 数据工厂管道 - 将单值源查询 output 存储为变量,然后在复制数据活动中使用 - Azure Data Factory Pipeline - Store single-value source query output as a variable to then use in Copy Data activity ADF 活动成功不会继续进行下一个活动 - ADF activity succeeded does not move on to the next activity 使用ADF Copy Activity,我需要将.zip中的.seq文件解压并转换为csv - Using ADF Copy Activity, I need to unzip and convert .seq files in .zip to csv 当 CSV 在 header 列中有空间时,ADF 复制活动失败 CSV 到 Parquet - ADF Copy Activity Fails CSV to Parquet when CSV has space in header column
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM