Connect Python to Power BI and SSAS and run DAX Queries

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

To get the columns name from source itself what you can do is write:

con = Pyadomd(connection_string)
con.open() # Open the connection

result =
col_names = [i.name for i in result.description]
df = pd.DataFrame(result.fetchone(), columns=col_names)

AntrikshSharma
Автор

model_name and port_number can also be obtained from the AnalysisServicesWorkspaces folder.
Can avoid random numbers name and port.

ct
Автор

Whatif the powebi connection needs user authentication alongwith ping id enabled.

rajeshn
Автор

Is it possible to connect SSAS using python in a Linux enviroment?

cristiandiaz
Автор

Hello,

Is it possible to connect with Power Bi Report Server ?

ray_an_e
Автор

Awesome video!!!
I have been using power bi api to draw data if necessary. But the limitation of my existing method is the dataset volume, I can't get the full dataset if the volume is over certain limit.
For the suggested method, does it also have limitation on the data volume?

tamyauming
Автор

Thanks for the video, the error that I keep on getting is: NameError: name 'AdomdConnection' is not defined

I am using anaconda

wearerunnersw.a.r
Автор

Hello, Antriksh! Amazing!

How I do that in SSAS on another server? How I log with the user authorized in the roles?

vinifroes
Автор

Hi,

To use pyadomd, do we need dll file to be downloaded?

ankithmg
Автор

Hi, how do we extract data from mdx query ?

PGhai
Автор

Want to learn ssas, any good resource bro?

abubakarali
Автор

Hello Antriksh Sharma, can I use this Path library in a Fast Api project in a Docker container, that is, be able to copy the folder so that it works in a Docker File image on Linux?

mariocanizalez
Автор

Thanks for this video.
Is it possible to conect with powerBi server too ?

sidneycomandulli
Автор

hello Antriksh bhai,

can we fetch measures list using python???? if yes plz help on it....

suyashsharma
Автор

Hi, I'm getting this error: NameError: name 'AdomdConnection' is not defined
What could this be caused by?

Thanks

muntean
Автор

connction_string = f'Provider=MSOLAP; Data Source={port_number}; Catlog={model_name};'

dax_query = """
Evaluate DimCustomers
"""

con = Pyadomd(connction_string)

con.open()
result =
df =
print(df)
con.close()

"""NameError Traceback (most recent call last)
Cell In[3], line 13
7 connction_string = f'Provider=MSOLAP; Data Source={port_number}; Catlog={model_name};'
9 dax_query = """
10 Evaluate DimCustomers
11 """
---> 13 con = Pyadomd(connction_string)
15 con.open()
16 result =

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pyadomd\pyadomd.py:127, in Pyadomd.__init__(self, conn_str)
126 def __init__(self, conn_str:str):
--> 127 self.conn = AdomdConnection()
128 self.conn.ConnectionString = conn_str

NameError: name 'AdomdConnection' is not defined"""

Connecting SSAS to Python

ZeeshanAli-hdfz
Автор

HI Antriksh, Thank you for posting this video. It is very helpful.
I followed all the instructions and still getting an error and don't know why. Would it be possible for you to please suggest further? below is the error I am getting.

NameError Traceback (most recent call last)
Cell In[28], line 1
----> 1 conn = Pyadomd(conn_str)

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyadomd\pyadomd.py:127, in Pyadomd.__init__(self, conn_str)
126 def __init__(self, conn_str:str):
--> 127 self.conn = AdomdConnection()
128 self.conn.ConnectionString = conn_str

NameError: name 'AdomdConnection' is not defined

satyapalrawat
Автор

Hi - this is a great video. Thank you for sharing. Please can you help with an error I am getting? Thanks in advance!

Error:


NameError Traceback (most recent call last)
Untitled-1.ipynb Cell 2 in <cell line: 1>()
----> 1 con = Pyadomd(connection_string)
3 con.open()
5 result =

File c:\Users\PC\AppData\Local\Programs\Python\Python310\lib\site-packages\pyadomd\pyadomd.py:127, in Pyadomd.__init__(self, conn_str)
126 def __init__(self, conn_str:str):
--> 127 self.conn = AdomdConnection()
128 self.conn.ConnectionString = conn_str

NameError: name 'AdomdConnection' is not defined

Code:

import pandas as pd
from sys import path
path.append('\\Program
from pyadomd import Pyadomd

model_name =
port_number = 'localhost:49301'

connection_string = f'Provider=MSOLAP;Data

dax_query = """
EVALUATE Budget
"""

con = Pyadomd(connection_string)

con.open()

result =

df =

print(df)

con.close()

alanhaine
Автор

dax_query = """
Evaluate CY Gallon
"""
con = Pyadomd(connection_str)
while using this it's showing this error - con = Pyadomd(connection_str)
TypeError: 'module' object is not callable
so can you help me in this case @Antriksh Sharma

nimeshchoudhary