Yes, you can use multiple gateways with Azure Analysis Services. You can configure multiple gateways and connect them to the same Azure Analysis Services resource. You can then use the Azure Analysis Services web portal to manage your gateways and choose which one to use.
As for automatic switching between gateways for a set period of time, Azure Analysis Services doesn't provide such functionality out of the box. However, you can use PowerShell scripts to automate the process of switching between gateways. You can create a script that runs on a schedule and switches the gateway connection every few hours or as per your requirements.
To configure automatic switching, you can create a PowerShell script that changes the connection string for Azure Analysis Services to point to a different gateway. You can then schedule the script to run periodically using Windows Task Scheduler or other similar tools.
Here is a sample PowerShell script that can be used to change the gateway connection string for Azure Analysis Services:
Bash:
# Set the gateway name and the Analysis Services instance name
$gatewayName = "MyGateway"
$instanceName = "MyAnalysisServicesInstance"
# Get the current gateway connection string
$currentConnectionString = Get-AzureAnalysisServicesServer $instanceName | Select-Object -ExpandProperty ConnectionString
# Build the new connection string with the gateway name
$newConnectionString = $currentConnectionString -replace "DataSource=asazure:", "DataSource=$gatewayName.asazure:"
# Update the connection string for Azure Analysis Services
Set-AzureAnalysisServicesServer -Name $instanceName -ConnectionString $newConnectionString
You can modify the above script to fit your requirements and schedule it to run periodically.