Azure data factory 链接服务参数化不适用于Azure Data Explorer(Kusto)类型的链接服务
我最初在AzureDataExplorer类型的ADFv2中成功创建了以下链接服务,用于访问ADX中名为CustomerDB的数据库:-Azure data factory 链接服务参数化不适用于Azure Data Explorer(Kusto)类型的链接服务,azure-data-factory,azure-data-factory-2,azure-data-explorer,Azure Data Factory,Azure Data Factory 2,Azure Data Explorer,我最初在AzureDataExplorer类型的ADFv2中成功创建了以下链接服务,用于访问ADX中名为CustomerDB的数据库:- { "name": "ls_AzureDataExplorer", "properties": { "type": "AzureDataExplorer", "annotations": [], "typeProperties": { "endpoint": "https://mycluster.xxxxmaskingr
{
"name": "ls_AzureDataExplorer",
"properties": {
"type": "AzureDataExplorer",
"annotations": [],
"typeProperties": {
"endpoint": "https://mycluster.xxxxmaskingregionxxxx.kusto.windows.net",
"tenant": "xxxxmaskingtenantidxxxx",
"servicePrincipalId": "xxxxmaskingspxxxx",
"servicePrincipalKey": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "ls_AzureKeyVault_MyKeyVault",
"type": "LinkedServiceReference"
},
"secretName": "MySecret"
},
"database": "CustomerDB"
}
},
"type": "Microsoft.DataFactory/factories/linkedservices"
}
这项工作进展顺利。出于显而易见的原因,我不得不掩盖一些价值观,但我只想说,这种联系没有问题。现在,受此Microsoft的启发,我正在尝试创建此链接服务的通用版本,这很有意义,因为如果集群中有10个数据库,我将不得不创建10个不同的链接服务
因此,我尝试以下列方式创建参数化版本:-
{
"name": "ls_AzureDataExplorer_Generic",
"properties": {
"type": "AzureDataExplorer",
"annotations": [],
"typeProperties": {
"endpoint": "https://mycluster.xxxxmaskingregionxxxx.kusto.windows.net",
"tenant": "xxxxmaskingtenantidxxxx",
"servicePrincipalId": "xxxxmaskingspxxxx",
"servicePrincipalKey": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "ls_AzureKeyVault_MyKeyVault",
"type": "LinkedServiceReference"
},
"secretName": "MySecret"
},
"database": "@{linkedService().DBName}"
}
},
"type": "Microsoft.DataFactory/factories/linkedservices"
}
但是,在发布更改时,我不断遇到以下错误:-
有什么解决办法吗
文章清楚指出:
对于所有其他数据存储,您可以通过选择Connections选项卡上的Code图标并使用JSON编辑器来参数化链接的服务
因此,根据,我的更改应该已成功发布。但是我一直收到错误。似乎我需要在同一个JSON中的其他地方指定参数。以下措施有效:-
{
"name": "ls_AzureDataExplorer_Generic",
"properties": {
"parameters": {
"DBName": {
"type": "string"
}
},
"type": "AzureDataExplorer",
"annotations": [],
"typeProperties": {
"endpoint": "https://mycluster.xxxxmaskingregionxxxx.kusto.windows.net",
"tenant": "xxxxmaskingtenantidxxxx",
"servicePrincipalId": "xxxxmaskingspxxxx",
"servicePrincipalKey": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "ls_AzureKeyVault_MyKeyVault",
"type": "LinkedServiceReference"
},
"secretName": "MySecret"
},
"database": "@{linkedService().DBName}"
}
},
"type": "Microsoft.DataFactory/factories/linkedservices"
}