简体   繁体   English

SQL 在 ADF 中使用脚本活动进行查询

[英]SQL Query using script activity in ADF

I have the script activity in ADF pipeline:我在 ADF 管道中有脚本活动:

在此处输入图像描述

On running this, I see the following error.运行它时,我看到以下错误。 What does this indicate and how do fix this?这表明什么以及如何解决这个问题?

在此处输入图像描述

You are trying to make tableName dynamic.您正在尝试使 tableName 动态化。 It won't work like that.它不会那样工作。 Better create a variable and use Set variable activity to set the tableName.最好创建一个变量并使用 Set variable activity 来设置 tableName。 Then use the same in your script Activity.然后在您的脚本活动中使用相同的内容。

select * from @{variables('tableName')} where id=@id

Set variable activity settings:设置可变活动设置: 在此处输入图像描述

Here is the script activity settings:这是脚本活动设置: 在此处输入图像描述

Output: Output: 在此处输入图像描述

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

相关问题 如何使用 .net sdk 在 Adf 复制活动中使用查询? - How to use query in Adf copy activity by using .net sdk? ADF - 访问脚本任务活动 output 中使用的 #table 或临时表,以作为源在复制活动中使用 - ADF - Access #table or Temp table used in Script task activity output to be used in Copy activity as source 使用 az cli - bash 脚本获取 ADF 管道状态 - Get ADF pipelines status using az cli - bash script 在 Azure 存储中创建文件列表并使用 ADF 将其发送到 sql 表 - Create list of files in Azure Storage and send it to sql table using ADF 使用参数的 ADF 中 SQL 数据集的不同架构名称 - Different Schema name for SQL datasets in ADF using parameters 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 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
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM