cubewise-code / tm1py

TM1py is a Python package that wraps the TM1 REST API in a simple to use library.
http://tm1py.readthedocs.io/en/latest/
MIT License
189 stars 109 forks source link

v10.2.2 connection check issue/confusion - connects with check.py but not with TM1service #942

Closed ejgoode27 closed 1 year ago

ejgoode27 commented 1 year ago

Describe what did you try to do with TM1py Ahoy there, currently in the process of upgrading from v10.2.2 FP6 on an old server, to v11.8, and wanting to use TM1py to compare the data quickly across all our cubes etc. The main issue to start with is that we can't connect through to the v10 server, and we currently only use perspectives rather than TM1 web.

Describe what's not working the way you expect Didn't get the expected result? Describe: We can connect when using the check.py from the samples: Check py

However when trying to connect and retrieve the TM1 service in pycharm we get the following errors: image

Other versions on v11 all work happy days, using the website check to enable the rest api and retrieving metadata (https://code.cubewise.com/blog/enabling-the-tm1-rest-api) https://10.40.1.160:8050/api/v1/$metadata

Version

Additional context This is the config file for the v10 set up: ServerName=fin AdminHost=kg-app-18 PortNumber=19399 IPAddress="10.40.1.160" HttpPortNumber=8050

DataBaseDirectory=D:\fin\Data LoggingDirectory=D:\fin\Log

IntegratedSecurityMode=2 SecurityPackageName=NTLM

I imagine a lot of the issues will be due to it being such an old version, but trying to utilise the power of TM1py for the upgrade data validation will make mine and a load of others on the journey much easier I'm hoping.

Cheers in advance,

E-J

ejgoode27 commented 1 year ago

Ahoy there,

Just wanted to see if anybody had any ideas on this yet? Wanting to do the upgrade in the next couple of weeks and the current method we're having to do is a loop through the cubes to do an export data for Bedrock with them but they're spitting out huge files and then do a check between CSVs using Notepad++ so would be easier if we could contain it all within TM1py to do everything for us. We think we have the code to be able to do it, it's just the connection validation which is preventing us from testing.

Cheers in advance,

E-J

MariusWirtz commented 1 year ago

I can't think of a reason why check.py would work with 10.2.2 FP6, but a custom script would not. Maybe take the check.py as a base and substitute the connection argument one by one until you find the source of the issue.

https://github.com/cubewise-code/tm1py-samples/blob/master/check.py

MariusWirtz commented 1 year ago

On a side note, when you load enormous datasets from TM1 with TM1py to Python, make sure to use the use_blob=True or use_iterative_json=True on the execute_mdx, execute_view function This will reduce Python memory consumption quite significantly.

ejgoode27 commented 1 year ago

Ahoy Marius,

Cheers for getting back and apologies for missing this message! Unfortunately we weren't able to solve it when substituting one by one on the arguments, but hopefully by the end of this week we'll be on v11 and then we can utilise TM1py to it's full potential! Will keep the memory saving tips in mind too!

Cheers,

E-J