I have an Azure data factory subscription, I want to trigger pipeline through my node.js application. The pipeline transfers data from azure cosmos to Azure blob storage. I have triggered the pipeline once manually. And I was trying to do the same with a node.js app, but it throws the following error:
{ Error: tunneling socket could not be established, cause=connect ETIMEDOUT 10.0.0.2:8080
at ClientRequest.onError (/home/deepti/Desktop/dbmanager/node_modules/tunnel-agent/index.js:177:17)
at Object.onceWrapper (events.js:286:20)
at ClientRequest.emit (events.js:198:13)
at Socket.socketErrorListener (_http_client.js:392:9)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19) code: 'ECONNRESET' }
And here's my code in node.js app :
Request.post("POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}/createRun?api-version=2018-06-01",(err,res,body)=>{
if(err) {
return console.log(err);
}
console.dir(JSON.parse(body));
});
Can anyone please guide me how do I rectify this error and proceed further. Do I need to generate some authorization token too?
Also, I actually want to back up data that is 1 month old from cosmos DB to Azure Blob, is that possible?


