azure - 如何从 Azure 数据工厂管道连接到网络驱动器

标签 azure azure-data-factory

我成功地使用文件系统链接服务连接到我的本地计算机。但现在,当我尝试使用类似的方法从网络驱动器访问文件夹时,我无法继续。请问谁能告诉我哪里出错了?

以下是从我的本地计算机连接时的工作版本。

{
    "name": "Test_FileSystem",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "annotations": [],
        "type": "FileServer",
        "typeProperties": {
            "host": "D:\\AZURE_FS",
            "userId": "<<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="750d0d0d351a07125b161a18" rel="noreferrer noopener nofollow">[email protected]</a>>",
            "encryptedCredential": "eyJDcmVkZW50aWFsSWQiOiI0ZDYwMWI1Yi02YmI3LTRlN2YtOTBmYi0xNmIzZjI1MzQ3ZjciLC=="
        },
        "connectVia": {
            "referenceName": "IR-FS-DEV",
            "type": "IntegrationRuntimeReference"
        }
    }
}

但是,当我使用类似的方法并尝试连接到网络驱动器时,我的连接失败。

{
    "name": "NetworkDrive_LS",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "annotations": [],
        "type": "FileServer",
        "typeProperties": {
            "host": "\\\\<host>:<port>\\SD\\AZURE_FS",
            "userId": "<userid>",
            "encryptedCredential": "eyJDcmVkZW50aWFsSW=="
        },
        "connectVia": {
            "referenceName": "ServerIR-VM",
            "type": "IntegrationRuntimeReference"
        }
    } }

此外,我正在使用自托管 IR。我做错了什么吗?我的错误如下:

文件路径\\<host>:<port>\SD\AZURE_FS不支持。检查配置以确保路径有效。不支持给定路径的格式。

最佳答案

看来我发现了我的错误 -

根据 documentation 中的示例

{
    "name": "FileLinkedService",
    "properties": {
        "type": "FileServer",
        "typeProperties": {
            "host": "<host>",
            "userid": "<domain>\\<user>",
            "password": {
                "type": "SecureString",
                "value": "<password>"
            }
        },
        "connectVia": {
            "referenceName": "<name of Integration Runtime>",
            "type": "IntegrationRuntimeReference"
        }
    }
}

我更改为添加用户 ID 的域,并删除了端口号。这样就解决了。

{
    "name": "NetworkDrive_LS",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "annotations": [],
        "type": "FileServer",
        "typeProperties": {
            "host": "\\\\<host>\\SD\\AZURE_FS",
            "userId": "<domain>\\<user>",
            "encryptedCredential": "eyJDcmVkZW50aWFsSWQiOiIwY=="
        },
        "connectVia": {
            "referenceName": "ServerIR-VM",
            "type": "IntegrationRuntimeReference"
        }
    }
}


 

关于azure - 如何从 Azure 数据工厂管道连接到网络驱动器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62931931/

相关文章:

.net - 我们如何使用 AzureServiceTokenProvider 获取受 Azure AD 保护的自定义 api 的 AccessToken?

azure - 无法在 Azure 中选择我的 'deployment projects'(VSTS 项目)

azure - 查找谁触发了 Azure 数据工厂管道 - ADF

json - 如何在Azure数据工厂复制事件中设置Content-Type?

azure - 使用 Azure 数据工厂进行 API 调用时出现错误 500

c# - 从字符串到 bool 值的奇怪映射行为

.net - HTTPS 重定向在本地有效,但在 azure 上无效

代表流程的 azure 广告范围始终重新审视所有同意的范围

azure - 读取 Azure 数据工厂 DataFlow 中的嵌套数组

具有现有 ADLS 链接服务的 Azure ADF 自定义事件