Azure-Player / azure.datafactory.tools

Tools for deploying Data Factory (v2) in Microsoft Azure
https://azureplayer.net/adftools
MIT License
212 stars 69 forks source link

Deployment fails: ##[error]ADFT0007: Could not find object: factory.myGlobalParam #398

Closed morrisNEB closed 3 months ago

morrisNEB commented 3 months ago

I am trying to deploy from JSON files first to my DEV environment and then to a QA environment. Both fail to find the global parameters when attempting to update/create the values from the deployment config file. I'm following the tutorial videos and using the documentation provided here. I've included both a config-DEV.csv and a config-QA.csv in a deployment folder and verified they are there in the drop folder created by the publish artifact task.

In my DEV data factory the global parameters already exist there and have been set manually. The DEV csv config is set to use the syntax that should update an existing value.

type,name,path,value factory,myGlobalParam,"$.properties.globalParameters.envName.value",test

My QA datafactory already exists but the global params have not yet been created. I've tried both syntax forms like the one above and the one below that should add a new global parameter.

type,name,path,value factory,myGlobalParam,"+$.properties.globalParameters.NewGlobalParam.value",test2 factory,myGlobalParam,"+$.properties.globalParameters.NewGlobalParam.type",string

Deploying to either DEV or QA both fail with the same issue. ##[error]ADFT0007: Could not find object: factory.myGlobalParam

morrisNEB commented 3 months ago

If I explicitly set the global parameters in ./factory/ADF-QA.json and remove the Stage parameter or path to the config-QA.csv file in the release pipeline it is able to publish the datafactory. It seems whenever I try to use the csv config to set the global parameters it fails to find them, despite the config telling it that it should be creating new global params.

NowinskiK commented 3 months ago

The second column (name) in CSV config file should be name of ADF, not Global Param.

morrisNEB commented 3 months ago

Thank you I see the mistake in my config now. The following worked to publish and update an existing global param.

type,name,path,value factory,ADF-QA,"$.properties.globalParameters.myGlobalParam.value",test