Skip to main content

A pythonic approach to query SSAS data models

Project description

Pyadomd

A pythonic approach to query SSAS data models.

Query SSAS Tabular model

from pyadomd import Pyadomd

from sys import path
path.append('\\Program Files\\Microsoft.NET\\ADOMD.NET\\150')

conn_str = 'Provider=MSOLAP;Data Source=localhost;Catalog=AdventureWorks;'
query = """EVALUATE Product"""

with Pyadomd(conn_str) as conn:
    with conn.cursor().execute(query) as cur:
        print(cur.fetchall())

Integrates easily with pandas

from pandas import DataFrame

with Pyadomd(conn_str) as conn:
    with conn.cursor().execute(q) as cur:
        df = DataFrame(cur.fetchone(),
        columns=[i.name for i in cur.description])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyadomd-0.0.3.tar.gz (4.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page