Microsoft Docs

Connect Data to Azure Analysis Services

Last updated: January 1, 2024

This document guides you through the process of connecting your Azure Analysis Services (AAS) model to various data sources. Establishing robust data connections is a fundamental step in building a powerful analytical solution.

Supported Data Sources

Azure Analysis Services supports a wide range of data sources, allowing you to integrate data from diverse locations. These include:

Steps to Connect Data

The primary tool for connecting data sources is Visual Studio with the SQL Server Data Tools (SSDT) installed for Analysis Services projects. You can also use other tools like tabular editor for more advanced scenarios.

Using Visual Studio with SSDT

  1. Open your Analysis Services project in Visual Studio.
  2. In the Solution Explorer, right-click on the Data Sources folder and select Add New Data Source.
  3. The Table Import Wizard will launch.
  4. Choose your data source type from the list provided.
  5. Provide connection details. This typically includes:
    • Server name
    • Database name
    • Authentication method (Windows Authentication, SQL Server Authentication, Azure AD, etc.)
  6. Test the connection to ensure it's successful.
  7. Select the tables or views you want to import into your model.
  8. Configure data transformation if needed (e.g., filtering rows, renaming columns).
  9. Click Finish to create the data source and import the selected data.

Connection Strings

For programmatic access or advanced configurations, you might need to construct connection strings. A typical connection string for Azure Analysis Services looks like this:

Server=tcp:your_aas_server_name.asazure.windows.net,443;Database=your_database_name;
            

For authentication using Azure Active Directory, you might use:

Server=tcp:your_aas_server_name.asazure.windows.net,443;Database=your_database_name;
            Authentication=ActiveDirectoryInteractive;
            

Refer to the official Azure Analysis Services documentation for a comprehensive list of connection string properties and examples.

Tip: Secure Your Credentials

When connecting to data sources that require credentials, always use secure methods. For Azure SQL Database and Azure Synapse Analytics, consider using Managed Identity or Azure Active Directory authentication to avoid storing passwords directly.

Import Modes

Azure Analysis Services supports two primary data import modes:

The choice of import mode depends on your specific requirements for data freshness, query performance, and data volume.

Data Refresh

For models using Import Mode, data needs to be refreshed periodically to reflect the latest data in the source. You can configure scheduled refreshes using:

Ensure your data refresh strategy aligns with your business needs for data currency.

Important Considerations

  • Network Connectivity: Ensure that your Azure Analysis Services instance can reach your data sources. This might involve configuring virtual networks, firewalls, or private endpoints.
  • Permissions: The account or service principal used to connect to the data source must have appropriate read permissions on the source data.
  • Data Volume: For large datasets, consider optimizing your source queries and choosing the appropriate import mode.

Troubleshooting Common Connection Issues

If you encounter issues connecting to your data source, consider the following: