![]() |
VOOZH | about |
The CData ADO.NET Provider for Azure Analysis Services is a standard ADO.NET Provider that make it easy to accomplish data cleansing, normalization, backup, and other integration tasks by enabling real-time access to Azure Analysis Services.
The ADO.NET Provider provides a SQL interface for Azure Analysis Services; this tutorial shows how to use the Provider to retrieve Azure Analysis Services data.
Once you have acquired the necessary connection properties, accessing Azure Analysis Services data in PowerShell can be enabled in three steps.
To connect to Azure Analysis Services, set the Url property to a valid server, for instance, asazure://southcentralus.asazure.windows.net/server, in addition to authenticating. Optionally, set Database to distinguish which Azure database on the server to connect to.
Azure Analysis Services uses the OAuth authentication standard. OAuth requires the authenticating user to interact with Azure Analysis Services using the browser. You can connect without setting any connection properties for your user credentials. See the Help documentation for more information.
Load the provider's assembly:
[Reflection.Assembly]::LoadFile("C:\Program Files\CData\CData ADO.NET Provider for Azure Analysis Services\lib\System.Data.CData.AAS.dll")
Connect to Azure Analysis Services:
$conn= New-Object System.Data.CData.AAS.AASConnection("URL=asazure://REGION.asazure.windows.net/server;InitiateOAuth=GETANDREFRESH;")
$conn.Open()
Instantiate the AASDataAdapter, execute an SQL query, and output the results:
$sql="SELECT Country, Education from Customer"
$da= New-Object System.Data.CData.AAS.AASDataAdapter($sql, $conn)
$dt= New-Object System.Data.DataTable
$da.Fill($dt)
$dt.Rows | foreach {
Write-Host $_.country $_.education
}
Download a free trial of the Azure Analysis Services Data Provider to get started:
Download NowLearn more:
👁 Azure Analysis Services IconRapidly create and deploy powerful .NET applications that integrate with Azure Analysis Services.