gpt4 book ai didi

azure - 二头肌 ADF 链接服务

转载 作者:行者123 更新时间:2023-12-03 01:15:48 25 4
gpt4 key购买 nike

我在尝试使用 Bicep(我才真正开始学习)将简单的 Azure BlobFS 链接服务部署到 ADF 中时遇到了很大的困难。

到目前为止我的二头肌是:

//---Data Factory
resource datafactory 'Microsoft.DataFactory/factories@2018-06-01' = {
name: adf_name
location: loc_name
identity: {
type: 'SystemAssigned'
}
properties: {
globalParameters: {}
publicNetworkAccess: 'Enabled'
}
}

//--- Data Factory Linked Service
resource adls_linked_service 'Microsoft.DataFactory/factories/linkedservices@2018-06-01' = {
name: 'ls_adf_to_adls'
parent: datafactory
properties: {
annotations: []
connectVia: {
parameters: {}
referenceName: 'AutoResolveIntegrationRuntime'
type: 'IntegrationRuntimeReference'
}
description: 'linked_service_for_adls'
parameters: {}
type: 'AzureBlobFS'
typeProperties: {
accountKey: datafactory.identity.principalId
azureCloudType: 'AzurePublic'
credential: {
referenceName: 'string'
type: 'CredentialReference'
}
servicePrincipalCredentialType: 'SecureString'
servicePrincipalId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
servicePrincipalKey: {
type: 'SecureString'
value: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
}
tenant: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
url: bicepstorage.properties.primaryEndpoints.blob
}
}
}

ADF 资源可以像 ADLS 一样自行部署(符号名称为:bicepstorage)。问题是当我添加 linkedservice 资源 block 时。我得到:

New-AzResourceGroupDeployment: /home/vsts/work/1/s/psh/deploy_main.ps1:12
Line |
12 | New-AzResourceGroupDeployment `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 22:46:27 - The deployment 'main' failed with error(s). Showing 1 out of
| 1 error(s). Status Message: Input is malformed. Reason: Could not get
| integration runtime details for AutoResolveIntegrationRuntime
| (Code:InputIsMalformedDetailed) CorrelationId:
| f77ef878-5314-46ea-9de6-65807845a104

ADF 中唯一的集成运行时是“AutoResolveIntegrationRuntime”。当我在门户中检查它时,它是绿色的、正在运行且健康的。

我在 ADF 的 ubuntu-latest 上使用任务:AzurePowerShell@5,但当我尝试直接从 vscode 部署模板时,出现相同的错误。

我没有主意,非常感谢一些帮助。我发现“connectVia” block 的文档(实际上是有关二头肌链接服务的所有文档!)非常令人困惑;如果有人能准确地告诉我里面应该放什么,我将非常感激。

谢谢。

最佳答案

this documentation 中所述,如果要使用默认 Azure IR (autoresolveintegrationruntime) 创建到 adls(blobfs) 的链接服务,则可以删除二头肌模板中链接服务 block 中的 ConnectionVia 属性。

enter image description here

为了测试这一点,我创建了一个二头肌模板,它将使用基于服务主体的身份验证来部署 adlsgen2 存储帐户、数据工厂和链接服务。

以下是示例模板供您引用:

param location string='westus'

//---Data Factory
resource storage 'Microsoft.Storage/storageAccounts@2022-09-01'={
name:'<storageAccountName>'
location:location
kind:'StorageV2'
sku:{
name:'Standard_GRS'
}
properties:{
accessTier:'Hot'
supportsHttpsTrafficOnly:true
isHnsEnabled:true
}
}
resource datafactory 'Microsoft.DataFactory/factories@2018-06-01' = {
name: '<AdfName>'
location: location
identity: {
type: 'SystemAssigned'
}
properties: {
globalParameters: {}
publicNetworkAccess: 'Enabled'
}
}
//--- Data Factory Linked Service
resource adls_linked_service 'Microsoft.DataFactory/factories/linkedservices@2018-06-01' = {
name: '<linkedserviceName>'
parent: datafactory
properties: {
annotations: []
description: 'linked_service_for_adls'
parameters: {}
type: 'AzureBlobFS'
typeProperties: {
url: storage.properties.primaryEndpoints.dfs
//encryptedCredential:storage.listKeys(storage.id).keys[0].value
servicePrincipalCredential: {
type: 'SecureString'
value: '<serviceprincipalKey>'
}
servicePrincipalId:'<serviceprincipalappId>'
servicePrincipalCredentialType:'ServicePrincipalKey'
azureCloudType:'AzurePublic'
servicePrincipalKey: {
type: 'SecureString'
value: '<serviceprincipalKey>'
}
tenant: '<tenantId>'
}
}
}

关于azure - 二头肌 ADF 链接服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74956891/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com