【问题标题】:Azure Data Factory v2 fails at sending data to Azure SearchAzure 数据工厂 v2 无法将数据发送到 Azure 搜索
【发布时间】:2018-08-16 16:40:00
【问题描述】:

我正在尝试将一些数据传输到 Azure 搜索,但由于某种原因它失败并显示 Invalid linked service reference. Name: AzureSearch1

我已经设置了这样的 Azure 搜索链接服务:

{
"name": "AzureSearch1",
"properties": {
    "type": "AzureSearch",
    "typeProperties": {
        "url": "https://xxxxxx.search.windows.net",
        "key": {
            "type": "AzureKeyVaultSecret",
            "store": {
                "referenceName": "AzureKeyVault",
                "type": "LinkedServiceReference"
            },
            "secretName": "Search-AdminKey"
        }
    },
    "connectVia": {
        "referenceName": "integrationRuntime1",
        "type": "IntegrationRuntimeReference"
    }
}
}

“测试连接”工作正常。

现在,我正在尝试像这样创建 Azure 搜索索引器:

{
    "name": "AzureSearchIndex_PriceSheet",
    "properties": {
        "linkedServiceName": {
            "referenceName": "AzureSearch1",
            "type": "LinkedServiceReference"
        },
        "type": "AzureSearchIndex",
        "typeProperties": {
            "indexName": "pricesheet"
        }
    }
}

但是当我单击“预览数据”或“导入架构”时它会失败并出现以下错误: Invalid linked service reference. Name: AzureSearch1. Activity ID:2fa29fe9-ca5d-4308-af62-xxxxxxxxx

集成管道设置为“西欧”,Azure 搜索也在该地区预配。

有什么想法吗? 谢谢!

【问题讨论】:

    标签: azure azure-cognitive-search azure-data-factory-2


    【解决方案1】:

    我试图重现您的问题但失败了。请参考我的工作配置:

    我的 Azure 搜索链接服务:

    {
        "name": "AzureSearch1",
        "properties": {
            "type": "AzureSearch",
            "typeProperties": {
                "url": "https://***.search.windows.net",
                "key": {
                    "type": "AzureKeyVaultSecret",
                    "store": {
                        "referenceName": "AzureKeyVault1",
                        "type": "LinkedServiceReference"
                    },
                    "secretName": "testas"
                }
            }
        },
        "type": "Microsoft.DataFactory/factories/linkedservices"
    }
    

    我的 Azure 搜索索引器:

    {
        "name": "AzureSearchIndex1",
        "properties": {
            "linkedServiceName": {
                "referenceName": "AzureSearch1",
                "type": "LinkedServiceReference"
            },
            "folder": {
                "name": "azureSearch"
            },
            "type": "AzureSearchIndex",
            "typeProperties": {
                "indexName": "documentdb-index"
            }
        },
        "type": "Microsoft.DataFactory/factories/datasets"
    }
    

    浏览数据:

    我推测可能是因为存储在 AKV 中的密码已过期,然后链接丢失连接。建议您在 AKV 中重新创建密码(只需设置默认配置),然后重试。

    希望对您有所帮助。如有任何疑问,请告诉我。

    【讨论】:

    • 我取出了 KeyVault 部分,只是对密钥进行了硬编码,这样就可以了。因此,我深入研究了 KeyVault,发现 MSI 权限存在问题并修复了它。谢谢!
    猜你喜欢
    • 2018-10-29
    • 1970-01-01
    • 2021-07-14
    • 1970-01-01
    • 1970-01-01
    • 2020-10-27
    • 1970-01-01
    • 2018-12-01
    • 1970-01-01
    相关资源
    最近更新 更多