-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
I'm trying to create a simple MDX example using a db backend, but I'm constantly getting "NoneType" is not ..... and the reason seams (at least on first sight) that olapy can't parse the query properly. (See the screenshot of a debug session).
The query is rather simple:
database_uri_with_no_db = f"postgresql+psycopg2://{config.DB_USER}:{config.DB_PASSWORD}@{config.DB_HOST}:{config.DB_PORT}"
os.environ["SQLALCHEMY_DATABASE_URI "] = database_uri_with_no_db
executor = MdxEngine(source_type="db", sqla_engine=db_engine, cube="accounts")
query = """
SELECT
{ [amount] } ON COLUMNS,
{ [account] } ON ROWS
FROM {accounts}
"""
df = executor.execute_mdx(query)['result']
What am I doing incorrectly?
(The actual error I'm getting when running the example is
Traceback (most recent call last):
File "W:\src\exampple\mdx.py", line 18, in <module>
df = executor.execute_mdx(query)['result']
File "C:\Python39\lib\site-packages\olapy\core\mdx\executor\execute.py", line 799, in execute_mdx
self.star_schema_dataframe[self.selected_measures].sum().to_frame().T
TypeError: 'NoneType' object is not subscriptable
Metadata
Metadata
Assignees
Labels
No labels
