We have parameterized our data factory linked services e.g.
I would like to override these values in our YAML release similar to what we do for the global parameters that i find reference to in the ARMTemplateParametersForFactory.json file e.g.
"default_properties_Environment_value": {
"value": "DEV"
},
"default_properties_db_Snowflake_UBA_Bronze_value": {
"value": "BRONZE"
},
"default_properties_db_Snowflake_UBA_Gold_value": {
"value": "GOLD"
},
with overrides in the yaml release
overrideParameters: >
-factoryName "$(DeployDataFactoryName)"
-default_properties_Environment_value $(Env)
-default_properties_db_Snowflake_UBA_Bronze_value $(bronze)
-default_properties_db_Snowflake_UBA_Gold_value $(gold)
This article is what i want to do but we have other linked services that have the same parameter name (Database_Name) for example so if i just override Database_name for example it will overwrite the value for both of our database connections instead of one. wouldnt i have to specify resourcename.parametername for example to override the values above?
Azure Data Factory Dynamic content default values per environment
The parameters i would like to override are in the ARMTemplateForFactory.json file.
here is a snipped of what i would like to overwrite
{
"name": "[concat(parameters('factoryName'), '/ls_SF')]",
"type": "Microsoft.DataFactory/factories/linkedServices",
"apiVersion": "2018-06-01",
"properties": {
"parameters": {
"Account_Name": {
"type": "string",
"defaultValue": "MY ACCOUNT"
},
"Database_Name": {
"type": "string"
},
"Warehouse": {
"type": "string",
"defaultValue": "MY_WAREHOUSE"
},
"Username": {
"type": "string",
"defaultValue": "MY_USERNAME"
}
},
in my yaml wouldnt i need to do
-"[concat(parameters('factoryName'), '/ls_SF')]".Database_Name $(databaseValue)
for example to only overwrite the Database_Name value and not the Database_Name value for our sql server linked service?
In addition to the question above, what is the best practice for storing database information? Should these values be parameterized or should they be added into the named fields in the connection as is and the db name parameterized at the dataset level?
We have parameterized our data factory linked services e.g.
I would like to override these values in our YAML release similar to what we do for the global parameters that i find reference to in the ARMTemplateParametersForFactory.json file e.g.
"default_properties_Environment_value": {
"value": "DEV"
},
"default_properties_db_Snowflake_UBA_Bronze_value": {
"value": "BRONZE"
},
"default_properties_db_Snowflake_UBA_Gold_value": {
"value": "GOLD"
},
with overrides in the yaml release
overrideParameters: >
-factoryName "$(DeployDataFactoryName)"
-default_properties_Environment_value $(Env)
-default_properties_db_Snowflake_UBA_Bronze_value $(bronze)
-default_properties_db_Snowflake_UBA_Gold_value $(gold)
This article is what i want to do but we have other linked services that have the same parameter name (Database_Name) for example so if i just override Database_name for example it will overwrite the value for both of our database connections instead of one. wouldnt i have to specify resourcename.parametername for example to override the values above?
Azure Data Factory Dynamic content default values per environment
The parameters i would like to override are in the ARMTemplateForFactory.json file.
here is a snipped of what i would like to overwrite
{
"name": "[concat(parameters('factoryName'), '/ls_SF')]",
"type": "Microsoft.DataFactory/factories/linkedServices",
"apiVersion": "2018-06-01",
"properties": {
"parameters": {
"Account_Name": {
"type": "string",
"defaultValue": "MY ACCOUNT"
},
"Database_Name": {
"type": "string"
},
"Warehouse": {
"type": "string",
"defaultValue": "MY_WAREHOUSE"
},
"Username": {
"type": "string",
"defaultValue": "MY_USERNAME"
}
},
in my yaml wouldnt i need to do
-"[concat(parameters('factoryName'), '/ls_SF')]".Database_Name $(databaseValue)
for example to only overwrite the Database_Name value and not the Database_Name value for our sql server linked service?
In addition to the question above, what is the best practice for storing database information? Should these values be parameterized or should they be added into the named fields in the connection as is and the db name parameterized at the dataset level?
Share Improve this question asked Feb 6 at 0:38 lemlem 1191 silver badge11 bronze badges1 Answer
Reset to default 0I followed the end ARMTemplateForFactory.json
snippet, and checked with class UI task which is equal with yaml one, actually it cannot detect the parameters under linkedServices/properties
. It only detects the parameters which defined at the begining in my ARMTemplateForFactory.json as below:
You need to modify your ARMTemplateForFactory.json
content, define the parameters, and use them for the properties values. Sample as below:
You can check similar answer and sample in link here for your reference. To use different Database_Name, you can define different parameters, then you override with different values.
In addition, it's generally a good practice to parameterize sensitive information such as database names, this allows you to manage these values more securely and makes it easier to update them across different environments.You can parameterize the database name at the dataset level if the database name changes frequently or if you need to access multiple databases using the same pipeline.