Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute_mdx - Sandbox Dimension #789

Closed
sbethea-cw opened this issue Aug 19, 2022 · 4 comments
Closed

Execute_mdx - Sandbox Dimension #789

sbethea-cw opened this issue Aug 19, 2022 · 4 comments

Comments

@sbethea-cw
Copy link

I have run into an issue when transferring data between two servers where tm1s.cfg parameter EnableSandboxDimension is different between the two servers. If EnableSandboxDimension=T on server1 and =F on server2, then the dimensionality of the cellset is not the same.
When I use execute_mdx on server1, the cellset looks like:
{('Base', 'ele1', 'ele2', 'ele3', 'Value'): 12345}
but server2 has EnableSandboxDimension=F and expects the cellset to look like:
{('ele1', 'ele2', 'ele3', 'Value'): 12345}
TM1 throws an error saying 'Base' is not a valid element, like this:
Error: Prolog procedure line (3): Invalid key: Dimension Name: "Version", Element Name (Key): "Base"

Can a feature be added to execute_mdx to exclude the sandbox dimension if it is turned on?

@MariusWirtz
Copy link
Collaborator

I agree. We should introduce an optional argument to the execute_mdx function. Something like skip_sandbox_dimension

@sbethea-cw
Copy link
Author

For reference, when using execute_mdx I can put all dimensions on rows/columns and use skip_context=True. This will leave the implicit sandbox dimension on context and exclude from the resulting cellset. This seems to work as a workaround.

@MariusWirtz
Copy link
Collaborator

Hi @sbethea-cw,

can you confirm that fix #812 works for you?

pip uninstall tm1py
pip install https://github.com/cubewise-code/tm1py/archive/refs/heads/master.zip

@sbethea-cw
Copy link
Author

Hi @MariusWirtz,

I tested execute_mdx with new argument skip_sandbox_dimension=True and it worked! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants