How to connect to Data bricks catalog database from Azure Analysis services

Lakshmi Narayana Sarma Bhamidipati 25 Reputation points
2024-01-30T14:06:06.3033333+00:00

Hi Friends, There is no native / default connecter from AAS to connect with Azure data bricks catalogue. But is there any work around to achieve this? Please let me know. Thanks in advance.

Azure Analysis Services
Azure Analysis Services
An Azure service that provides an enterprise-grade analytics engine.
438 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,936 questions
{count} votes

1 answer

Sort by: Most helpful
  1. BhargavaGunnam-MSFT 26,226 Reputation points Microsoft Employee
    2024-01-30T19:01:58.7433333+00:00

    Hello Lakshmi Narayana Sarma Bhamidipati, After further research, I found out that we can connect to Azure Analysis Services using the Pyodbc library:

    %python import pyodbc

    driver = "{ODBC Driver 17 for SQL Server}" server = "your_server.database.windows.net" database = "your_database" username = "your_username" password = "your_password" analysis_services_database = "your_analysis_services_database"

    connection_string = f"DRIVER={driver};SERVER={server};DATABASE={database};UID={username};PWD={password};"

    conn = pyodbc.connect(connection_string, autocommit=True) cursor = conn.cursor()

    query = f"SELECT * FROM {analysis_services_database}..." cursor.execute(query)

    This was discussed on the databricks community forum in the below link.

    https://community.databricks.com/t5/data-engineering/connect-and-process-azure-analysis-services/td-p/41181

    Please try the solution and let me know.

    0 comments No comments