此问题通常在循环引用数据工厂管道时出现。为了解决这个问题,可以使用以下示例代码:
在调用管道1的活动中,添加一个参数来指示该操作正在调用自身的管道。在管道1的活动中检查此参数是否已设置。如果是,则跳过该操作,否则将其设置为true,并继续执行操作。最后在该操作完成时,将参数设置为false。
示例代码:
{ "name": "ExecutePipeline1", "type": "ExecutePipeline", "typeProperties": { "pipeline": "Pipeline1", "waitOnCompletion": true, "parameters": { "IsCalledPipeline1": false } } }
{ "name": "CopyData", "type": "Copy", "dependsOn": [], "policy": { "timeout": "1.00:00:00", "retry": 0, "retryIntervalInSeconds": 30, "secureOutput": false }, "typeProperties": { "source": { "type": "SqlSource", "sqlReaderQuery": "SELECT * FROM Orders" }, "sink": { "type": "SqlSink", "writeBatchSize": 1000, "writeBatchTimeout": "00:01:00" } "cloudParameters": { "IsCalledPipeline1": "@pipeline().parameters.IsCalledPipeline1" } } }
{ "name": "CopyData", "type": "Copy", "dependsOn": [], "policy": { "timeout": "1.00:00:00", "retry": 0, "retryIntervalInSeconds": 30, "secureOutput": false