我有一个使用SQL Server链接服务的DataFactory管道。管道将由c#代码触发。在运行时,我希望将其作为参数值从C#代码传递,而不是对链接服务器上的服务器名,数据库名和密码进行硬编码。
{
"name": "EncryptedSqlServerLinkedService",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"parameters": {
"ServerName": {
"type": "String"
}
},
"type": "SqlServer",
"typeProperties": {
"connectionString": "integrated security=False;data source=@{linkedService().ServerName};initial catalog=DBName;user id=userName",
"encryptedCredential": "eyJDcmVkZW50aWFsSWQiOiI4YjI0NzQ3MS1mM="
},
"connectVia": {
"referenceName": "Di-DF-IntRunTime",
"type": "IntegrationRuntimeReference"
}
}
如何从触发的c#代码中设置ServerName的值?
谢谢