[英]ADF Copy Activity with Additional Columns is Not working
My goal is to add some text to a file.我的目标是在文件中添加一些文本。 I used this post here to help me design this setup.
我在这里使用这篇文章来帮助我设计这个设置。
I have a set variable that sets a variable with some value.我有一个设置变量,它设置一个具有某个值的变量。 I then have a copy activity.
然后我有一个复制活动。 This copy activity has an empty file for the source.
此复制活动有一个用于源的空文件。 I then add in an additional column that uses my set variable.
然后我添加了一个使用我的设置变量的附加列。 In sink I have a different file I hope to copy the contents of set variable to.
在接收器中,我有一个不同的文件,我希望将设置变量的内容复制到。 When I run in debug mode, the sink file ends up empty.
当我在调试模式下运行时,接收器文件最终为空。 The additional column is not being copied over.
未复制附加列。 I tried with a mapping and then without.
我尝试了映射,然后没有。 In both cases the same thing happened.
在这两种情况下,同样的事情发生了。
Does anyone have any ideas or tips?有没有人有任何想法或提示?
I have tried and also seen the same empty data in the sink file as you mentioned.我已经尝试过并且在接收器文件中也看到了与您提到的相同的空数据。
Sink file:接收文件:
You can raise the support ticket or feel free to post your question in Microsoft Q&A forum where the product team will monitor them closely.您可以提出支持票或随时在Microsoft 问答论坛中发布您的问题,产品团队将密切关注他们。
I'm not sure the file based copy activity is supposed to work this way, you need input data/rows for it to enumerate.我不确定基于文件的复制活动是否应该以这种方式工作,您需要输入数据/行才能枚举。 If you have access to SQL server then you could simulate a dynamic SQL query to include the contents of your variable as a tabular output.
如果您有权访问 SQL 服务器,那么您可以模拟动态 SQL 查询以将变量的内容包含为表格 output。 This can then define a source set of rows that could be appended into a file.
然后,这可以定义可以附加到文件中的源行集。
For example, SQL for Source Query :例如,SQL 用于源查询:
/*
Bring in the value from your variable. use @@ to escape the SQL parameter name
NOTE: Do not forget to escape single quotes if they exist in your string, replace ' with ''
*/
declare @@my_sql_var nvarchar(max) = '@{variables('fileContents')}';
/*
Do some work here with this variable
*/
/*
Return the tabular response for the copy activity source query.
*/
select @@my_sql_var [VariableName];
Copy Activity - SQL Source复制活动 - SQL 源
Dynamic Expression for Source Query源查询的动态表达式
Preview Output预览 Output
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.