问题描述
我在Azure批处理服务中为Azure数据工厂自定义活动添加了代码,并将数据工厂管道指向了bacth服务。当我在本地环境中执行代码时,它可以正常工作。但是,当我将其上载以在azure批处理服务中运行时,它会抛出并发出sqlexception
I have added code for Azure datafactory custom activity in Azure batch service and pointed the datafactory pipeline to the bacth service. When I execute the code in local environment, it works fine. But when I upload it to run in azure batch service, it throws and sqlexception
推荐答案
今天,自定义活动无法访问本地资源。数据移动网关仅可用于copy\Sproc活动方案,并且不具有执行客户代码的接口。
Today, Custom activity cannot access on-prem resource. The data movement gateway can only be used on copy\Sproc activity scenario, and it doesn’t have interface to execute customer’s code.
此处的解决方案是:
尝试复制活动,以将数据复制到Azure存储或其他公共云可以访问的数据。然后运行自定义活动。
否则,您可以尝试vNet和ExpressRoute将Azure公共云与本地环境连接。
The solution here is:Try copy activity to copy your data to azure storage or other public cloud can access. Then run custom activity.Otherwise you can try vNet and ExpressRoute to connect your Azure public cloud with your onprem environment.
这篇关于本地SQL连接在Datafactory自定义活动中引发SqlException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!