Azure-Player / azure.datafactory.tools

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

Unable to use `$.` to refer to the root of the JSON #383

Closed camilo-s closed 5 months ago

camilo-s commented 5 months ago

Describe the bug I'm trying to use the $. syntax to replace the name of the data factory object by setting the path from the root of the JSON. However, I get the following error:

     | ADFT0010: Wrong path defined in config for object(path):
     | factory.adf-trial-dev(properties.$.name)

To Reproduce I'm passing a config-qa.csv file with the following content:

type,name,path,value
factory,adf-trial-dev,$.name,adf-trial-qa

Expected behaviour I would expect the path to be parsed correctly starting from the root when prepending it with $.

Looking at the source for Update-PropertiesForObject though, it seems the $path variable is always adjoined to the properties node, making it impossible to actually target the JSON's root node.

Version of PowerShell module of:

Provide all files to reproduce the issue

NowinskiK commented 5 months ago

The tool doesn't support renaming ADF's objects, hence it's not possible to change name property in files.