If you need to to share values between Azure runbooks or parameterise them, Automation Variables may be just the thing you need.
Essentially these are exactly what you might expect – variables which you define and can use within Azure. The variables can be updated via Powershell scripts, manually via the Azure portal and of course by runbooks.
The first thing to do is to define the variable. To do this go to the Azure portal and go into the Automation section. Following this navigate to the assets section, click new and select ‘Add Setting’
Select ‘Add Variable’
Fill in the relevant details for the variable. Note the variable type can be changed programmatically later if this is required.
Set a default value for the variable if it’s required and if the variable contains sensitive information you can also select for it to be encrypted.
To access the variable from the Powershell script the syntax used is like this:
Get-AutomationVariable -Name ‘VariableName’
So for example, in order to access the value of a variable called “ETLProcessStatus” and assign this to a variable named $CurrentRunStatus you would do the following:
$CurrentRunStatus = Get-AutomationVariable -Name “ETLProcessStatus”
In case you forget the syntax for retrieving or updating the value of the variables there is a nice feature where it will write the basic syntax out for you.
Click insert at the bottom of the ribbon and then ‘Setting’
Following this you can select from the following options and template commands will be inserted into the script.
In a blog which will be coming shortly, I will detail how I use this variable and some other techniques in order to assist in running a scalable cloud ETL solution.
Please get in touch if you would like to know more
Databricks Vs Synapse Spark Pools – What, When and Where?
Databricks or Synapse seems to be the question on everyone’s lips, whether its people asking
May
Power BI to Power AI – Part 2
This post is the second part of a blog series on the AI features of
Apr
Geospatial Sample architecture overview
The first blog ‘Part 1 – Introduction to Geospatial data’ gave an overview into geospatial
Apr
Data Lakehouses for Dummies
When we are thinking about data platforms, there are many different services and architectures that
Apr
Enable Smart Facility Management with Azure Digital Twins
Before I started writing this blog, I went to Google and searched for the keywords
Apr
Migrating On-Prem SSIS workload to Azure
Goal of this blog There can be scenario where organization wants to migrate there existing
Mar
Send B2B data with Azure Logic Apps and Enterprise Integration Pack
After creating an integration account that has partners and agreements, we are ready to create
Mar
Incremental Group is acquired by Telefónica Tech
Incremental’s acquisition by Telefónica Tech powers the next phase of growth for the digital technology
Mar