【发布时间】:2021-05-02 23:55:33
【问题描述】:
我正在尝试从 Python 中为 Azure 数据工厂创建 SQL Server 链接服务。导入所有依赖项并成功创建数据工厂。创建链接服务失败。
这是我从 Python 运行的伪代码:
ls_name = 'Blah'
properties = SqlServerLinkedService(
connection_string="blahblah.database.windows.net",
connect_via={"referenceName": "AutoResolveIntegrationRuntime", "type": "IntegrationRuntimeReference"},
user_name="my-user-name",
password=SecureString("my-plaintext-password")
)
ls = adf_client.linked_services.create_or_update( resource_group_name=rg_name, factory_name=df_name, linked_service_name=ls_name, linked_service=properties)
首先,如果我保持 SecureString 的格式与上面一样,我会收到关于 2 个位置参数的错误,其中只需要 1 个,如果我完全取出密码行,我会在 create_or_update 时收到“错误请求”函数在底部运行。他们非常缺乏 Microsoft Python SDK 文档。有人可以帮我弄清楚如何正确编码吗?
文件“/usr/local/lib/python3.8/dist-packages/azure/mgmt/datafactory/operations/_linked_services_operations.py”,第 190 行,在 create_or_update 引发 HttpResponseError(response=response, error_format=ARMErrorFormat) azure.core.exceptions.HttpResponseError:操作返回无效状态“错误请求”
【问题讨论】:
标签: python azure-data-factory azure-data-factory-2