Is it possible to create another variable which references this one but uses regular expressions to only get the part after the last backslash of the database names ?
I know that if we apply the /([^/]+$)/ regular expression on the result of ResourceNames(rg-, Microsoft.Sql/servers/databases) we get only the part we want.
I figured out how to accomplish this.
Instead of trying to create the second variable with the Azure Monitor data source, I’ve used the SQL Server data source, and used this query instead:
SELECT SUBSTRING(’$databaseResourceName’, CHARINDEX(’/’, ‘$databaseResourceName’) + 1, LEN(’$databaseResourceName’) - CHARINDEX(’/’, ‘$databaseResourceName’))
With this query, there was no need for regular expressions.
I suspect that the query I was trying to achieve would not be possible using the Azure Monitor data source