Giter VIP home page Giter VIP logo

tm1py's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tm1py's Issues

ProductVersion?

Marius, I'm working with your get_view_content routine to create CSV output. Testing with 10.2.2 and with PA, I see that the dimension references come out differently:
10.2.2 '[actvsbud].[Actual]'
PA '[actvsbud].['actvsbud'].[Actual]'
(ie the hierarchies show)
I could just count the fullstops, but I thought it worth proposing the inclusion of a object equivalent to the Rest call
http://localhost:8010/api/v1/Configuration
which (inter alia) shows
"ProductVersion": "10.2.20700.43"
Users could then test the release and handle the output accordingly. I have looked through the latest version and couldn't spot this. What do you think?
FYI, I am hoping to be able to pass back some of the code I have been building, but I need clearance from the Directors and they are on holiday.

Format Execute_mdx

Hello ,

I would know if it's possible to have the same rows and columns that a view.
For example, when i make a view, i define rows and columns ( like a crosstab) but when i want to get data by a dataframe ( or by csv) i have only data by row

this is my code :

mdx = tm1.cubes.views.get_native_view(cube_name, view_name, private=False).as_MDX
content = tm1.cubes.cells.execute_mdx_get_dataframe(mdx)

thank you
Laurent

Site-Packages install

Due to various security settings at my client, I am unable to use pip to install, and have to manually put it in the site-packages folder. How would I go about handling the dependencies?

Btw, it's a 10061 error in pip.

To know sheduled process time and business rules

Hello
Its really nice to play with tm1py
I want to know how can we know which processes are sheduled with their time?
and also can we get the business rules directly which are used for cube?
Thanks is advance

How to Run Multiple Rest Scripts at Once

Is there a specific way to get TM1py to run in concurrent sessions when connecting through TM1Service?
We created a script that reads a CSV file and kicks off multiple TIs via rest. However, we want to kick off a second instance of this script with different TIs at the same time but it seems that it is not working. We tried looking at session_id but are unsure of how to generate a unique one.

Any help would be great!

Code attached.
RunTI.txt

Error while updating TI process in TM1 < 11

Hi,

I'm getting the following error when trying to create/update a process with the following json body.

Exception:
...\TM1py\Services\ProcessService.py", line 121, in create
del body['Parameters'][p]['Type']
TypeError: list indices must be integers or slices, not dict

Process JSON:
'{"Name": "Admin - Start GL Forecast1", "PrologProcedure": "\\r\\n#****Begin: Generated Statements***\\r\\n#****End: Generated Statements****\\r\\n\\r\\n", "MetadataProcedure": "\\r\\n#****Begin: Generated Statements***\\r\\n#****End: Generated Statements****\\r\\n", "DataProcedure": "\\r\\n#****Begin: Generated Statements***\\r\\n#****End: Generated Statements****\\r\\n", "EpilogProcedure": "\\r\\n#****Begin: Generated Statements***\\r\\n#****End: Generated Statements****\\r\\n", "HasSecurityAccess": false, "UIData": "CubeAction=1511\\fDataAction=1503\\fCubeLogChanges=0\\f", "DataSource": {"Type": "None"}, "Parameters": [{"Name": "pStartPeriod", "Prompt": "", "Value": ""}], "Variables": [], "VariablesUIData": []}'

TM1 Version 10.2.2 FP6 IF7

Cellset writeback

I'm developing a TM1PY routine to transfer data between servers. When testing out writing back to a cellset including consolidated values, it gave a (reasonable) error "CubeCellWriteStatusElementIsConsolidated"} and failed. I can see this giving rise to issues in putting together generic transfer routines where destination cells might be consolidated, ruled, locked or not-writable by security. I suppose it's really a question for Hubert Heijkers and the team, but what do you think ought to happen?

No issue

Hi Marius,

a very nice python wrapper for the TM1-Rest-API you have developed so far! :) Thank you for the share!

I have a question (is where any other place than here to dump comments?) regarding your usage of TM1py. Do you use it productively for some tm1 model buildings for your work already?

Is there any documentation which resources can be adressed with the TM1-Rest-API and how they can be used to contribute/complement code to your project?

Thank you in advance,
Timo

Elements with multiple parents - extra label info

Hi,
Thanks for creating this package! We will be using it in several ways.
We're new to Python - so this issue may not really be an issue:

When an element has more than one parent, the data.execute_mdx method pulls in unwanted hierarchy information. For example, we have an element '2017-01-15' with more than one parent. It comes through as:
'2017-01^2017-01-15'
In this case, '2017-01-15' directly rolls into: '2017-01', 'WE 2017-01-21' and 'All Days'

If '2017-01' rolls into more than one parent, you'll get another level of the hierarchy.

When an element has only one parent, it comes through as desired '2017-01-15'
I can reproduce this issue in any dimension for any element - it just needs to roll into more than one parent.
Is this a bug? or is there a way to not get the unwanted hierarchy info?

Here's my MDX statement...
mdx = "SELECT {[Dailies Digital - Metrics].[Customer Traffic Volume],
[Dailies Digital - Metrics].[Cart Starts Customer]} ON Columns,
tm1filterbylevel(Descendants([Glance - Date].[2017]),0) ON Rows
FROM [Dailies Digital]
Where ([Dailies Digital - Version].[Actuals])"

Pandas Dataframe

It appears the pandas dataframe brings in all the data but there are no column splits. Any chance you could modify the code to split the data into columns? Or possibly I have missed something and there is a way. I was about to head down the path of parsing the columns either from the string data thats returned or the dataframe

Hierarchy

When extracting a view from tm1 using tm1py, Is there a way to extract what level on a hierarchy a particular element of a dimension is?

TransactionLog

Hi,

The description mentions querying TransactionLog, but I cannot seem to find any Service that would provide it.

Am I missing something?

Dimension/Hierarchy update errors

Marius, I have been working with TM1PY this week. Much of the functionality is working, but I am getting odd, inconsistent results with dimension updates.
I have one setup running PA Local (11.0.00000.918) under Windows 7. This is working. It works whether I run the Python scripts locally or on another PC.
I have another setup running PA Local (11.0.00200.998) under Windows Server 2016, within a VM. Running the scripts gives the error
"code":"278","message":"Cannot modify Attributes property during Hierarchy PATCH
Running the scripts against 10.2.2 FP7 gives the error
"code":"","message":"PATCH not supported on this resource!"
The script I use is:

from Services.LoginService import LoginService
from Services.RESTService import RESTService
from Services.DimensionService import DimensionService
from Services.HierarchyService import HierarchyService
login = LoginService.native('admin', 'apple')
# address = '25.39.47.199'
# address = '10.0.0.202'
address = ''
# Connection to TM1. Needs IP, Port, Credentials, and SSL
with RESTService(ip=address, port=8010, login=login, ssl=False) as tm1_rest:
    dimension_service = DimensionService(tm1_rest)
    # get dimension
    dimension = dimension_service.get('model2')
    # get the default hierarchy of the dimension
    h = dimension.hierarchies[0]
    # create new random element name
    element_name = 'Test9'
    # add element to hierarchy
    h.add_element(element_name=element_name, element_type='Numeric')
    #h.edges.clear()
    # add edge to hierarchy
    h.add_edge('Total', element_name, 1000)
  
    #for parent, child in h.edges:
    #       print("Parent Name: {}, Component Name: {}".format(parent, child))
    #h.remove_edge('Total','K Series')
    # write Dimension back to TM1
    
    dimension_service.update(dimension)

I was hoping to raise this in the SDK forum but I believe that I would need to show the REST/ODATA calls, and I am not sure how to do this for PATCH.
If you have any suggestions I would be very grateful. (I have tried SSL and so long as the setting matches the server all seems to be fine.)

logout

not sure if this matters but why is the logout method a post and not a get?

Support for TM1SessionID or cookiejar in RESTService

It would be useful if TM1py supported initializing a RESTService with an additional TM1SessionId or session cookiejar parameter to bypass the authentication process on the TM1 server. An LDAP authentication request can take 10-20s for us (or can be delayed if there are waits on the TM1 server), so caching the session is a necessity for us.

Access level

We are working with tm1py package rest of the codes are executing perfectly but the code of checking element access is giving error as element attribute.I want to check the access of element level for a particular user how can I do that?
Thanks in advance.

TM1py should be able to decode Base64 password

Hi Marius,

As spoken, it would be better if the TM1 connection parameters between RushTI and TM1py were consistent. In RushTI requires the password to be encode in Base64 whereas TM1py uses plain text password.

To make sure we do not break existing scripts, TM1py should support password in plain text or in Base64 format.
TM1py should check first if it can connect to TM1 by reading the password as it was plain text and if it can't connect it tries to decode it.

I hope this is clear,

Cheers,

Vincent

Leaf level elements getting added both under main hierarchy and without hierarchy

Hi,

I'm trying to create an "Year" dimension which has 'year' as level 2 & q1, q2, q3 and q4 as level 1 elements. I would like to have months as level 0 members. For doing so I have written the below code:

`import configparser
config = configparser.ConfigParser()
config.read(r'C:\AppData\Local\Programs\Python\Python37-32\config.ini')

from TM1py.Objects import Dimension, Element, Hierarchy
from TM1py.Services import TM1Service

Dimension_Name = 'YEAR_TM1PY'

with TM1Service(**config['USCPADM_SIT']) as tm1:

create elements objects

elements = [Element(name='Year', element_type='Consolidated'),
Element(name='Q1', element_type='Consolidated'),
Element(name='Q2', element_type='Consolidated'),
Element(name='Q3', element_type='Consolidated'),
Element(name='Q4', element_type='Consolidated'),
Element(name='JAN', element_type='Numeric'),
Element(name='FEB', element_type='Numeric'),
Element(name='MAR', element_type='Numeric'),
Element(name='APR', element_type='Numeric'),
Element(name='MAY', element_type='Numeric'),
Element(name='JUN', element_type='Numeric'),
Element(name='JUL', element_type='Numeric'),
Element(name='AUG', element_type='Numeric'),
Element(name='SEP', element_type='Numeric'),
Element(name='OCT', element_type='Numeric'),
Element(name='NOV', element_type='Numeric'),
Element(name='DEC', element_type='Numeric')]

create edge object

edges = {('Year', 'Q1'): 1,
('Year', 'Q2'): 1,
('Year', 'Q3'): 1,
('Year', 'Q4'): 1,
('Q1', 'JAN'): 1,
('Q1', 'FEB'): 1,
('Q1', 'MAR'): 1,
('Q2', 'APR'): 1,
('Q2', 'MAY'): 1,
('Q2', 'JUN'): 1,
('Q3', 'JUL'): 1,
('Q3', 'AUG'): 1,
('Q3', 'SEP'): 1,
('Q4', 'OCT'): 1,
('Q4', 'NOV'): 1,
('Q4', 'DEC'): 1}

create hierarchy object

hierarchy = Hierarchy(name=Dimension_Name, dimension_name=Dimension_Name, elements=elements, edges=edges)

create dimension object

Dim = Dimension(name=Dimension_Name, hierarchies=[hierarchy])

create dimension in TM1 !

tm1.dimensions.create(Dim)`

The code executes properly and creates the expected dimension. But there is a problem with the hierarchy created.

Normal expected hierarchy
All level 0 elements stand out without any hierarchy
Now how to avoid these level 0 hierarchy-less or parent-less elements? Please advise.

Copy of list in the Process init function

Hello,

Many operations in the constructor of the Process Class are unpythonic. One should preferably create a new copy of the list or making a deep copy of the new list. This can be done with self.variables = list(variables) or with the copy.deepcopy function from the copy module.

build_headers_from_cellset - support for Calculated Members in MDX Queries

@DJHig ,
the build_headers_from_cellset function can't consume cellsets that were generated from MDX Queries with calculated members.

When I use it with the following Query:

    WITH MEMBER [Date].[First 2 Month] AS AGGREGATE({[Date].[2017-01], [Date].[2017-02]})
    SELECT 
    NON EMPTY {[Date].[First 2 Month], [Date].[2017-01]:[Date].[2017-12]} on ROWS, 
    NON EMPTY {[City].[NYC], [City].[Chicago], [City].[Washington]} on COLUMNS  
    FROM [Bike Shares] 
    WHERE ([Bike Shares Measure].[Count],[Version].[Actual]) 

I get this error:
Traceback (most recent call last):
File "C:/Projects/TM1py-samples/Query Data/mdx_query_different_formats.py", line 80, in
array = tm1.cubes.cells.execute_mdx_ui_array(mdx, value_precision=1)
File "C:\Anaconda3\lib\site-packages\TM1py\Services\CellService.py", line 409, in execute_mdx_ui_array
return Utils.build_ui_arrays_from_cellset(raw_cellset_as_dict=data, value_precision=value_precision)
File "C:\Anaconda3\lib\site-packages\TM1py\Utils\Utils.py", line 147, in build_ui_arrays_from_cellset
header_map = build_headers_from_cellset(raw_cellset_as_dict, force_header_dimensionality=3)
File "C:\Anaconda3\lib\site-packages\TM1py\Utils\Utils.py", line 254, in build_headers_from_cellset
for member in tuples_as_dict]
File "C:\Anaconda3\lib\site-packages\TM1py\Utils\Utils.py", line 254, in
for member in tuples_as_dict]
AttributeError: 'NoneType' object has no attribute 'keys'

CompileProcess not exposed?

Using TM1Services.processes.create(Process) I can create a syntactic incorrect process on my TM1 server. I wanted to use CompileProcess, but the method does not seem to be mapped, right?

Chores list doesn't work ! :-(

Hi guys,

I'm big fan of TM1py !...

... and I need i little help.

I'm create a python script to list all my objects on TM1 server.
The cubes and dimension works fine but the chores list doesn't.

My chores.py

#Open connection with TM1
with TM1Service(address=address, port=port, user=user, password=password, namespace=namespace, ssl=ssl) as tm1:
    server_name = tm1.server.get_server_name()
    version = tm1.version

    #Write output file
    with open("TM1_Summary{}.txt".format(server_name),"w+") as file:

        #Server name
        file.write("# Server Name: {a}\n".format(a=server_name) )
        file.write("# version: {a}\n".format(a=version) )
        
        #CHORES
        chores = tm1.chores.get_all_names()
        for chore in chores:
            file.write("\nCHORE:{}\n".format(chore))

When I try to run the error is show:

Traceback (most recent call last):
  File "chores.py", line 33, in <module>
    chores = tm1.chores.get_all_names()
  File "C:\Users\my_User\AppData\Local\Programs\Python\Python35\lib\site-packages\TM1py\Services\ChoreService.py", line 69, in get_all_names
    response = self._rest.GET(request)
  File "C:\Users\my_User\AppData\Local\Programs\Python\Python35\lib\site-packages\TM1py\Services\RESTService.py", line 30, in wrapper
    self.verify_response(response=response)
  File "C:\Users\my_User\AppData\Local\Programs\Python\Python35\lib\site-packages\TM1py\Services\RESTService.py", line 214, in verify_response
    raise TM1pyException(response.text, status_code=response.status_code, reason=response.reason)
TM1py.Exceptions.Exceptions.TM1pyException: Text: {"error":{"code":"","message":"'Chores' resource can not be resolved on type 'EntityContainer'."}} Status Code: 404 Reason: Not Found

My output( TM1_Summary.txt)

# Server Name: myserver
# version: 10.2.20000.50183

Thank you in advance and congratulations by the awesome library.
The TM1 looks like much more funny with that...

Proxy in authentification

Hello,

Is there a better solution to circument the proxy than setting the requests session to trusted environment to false?

Set context for TM1Py Connections

Is there a method that we can use to set the context of our TM1 connection? According to the metadata document has context property. It would be really useful to default that property to "TM1py" when a session is established. Then it can be updated if TM1py is used inside another program. I can write something if it it is not currently supported.

Simplify attributes and properties of classes

Hello,

Although it is recommanded and often forced to use private, restricted and public properties in type languages, these are often avoided in python. It would greatly increase the readibility (and reduce the size) of the code if one avoided all those underscore "private" variables and their accessor methods.

The reason is the dynamic nature of python objects, as one could set new property on the fly to an existing object if one desired.

SystemParameterTypeInvalid when creating process

Hi,

I'm getting a SystemParameterTypeInvalid exception while trying to create a process using the below JSON. The body in getting extracted from a working process.

My code

tm1refmodel = TM1Service(address='...', port=8037, user='admin', password='apple', ssl=True)
tm1compmodel = TM1Service(address='...', port=8042, user='admin', password='apple', ssl=True)

ProcDef = tm1refmodel.processes.get("Cons - Import Data Feedback")
logger.info(ProcDef)
tm1compmodel.processes.create(ProcDef)

tm1refmodel.logout()
tm1compmodel.logout()

...\TM1py\Services\RESTService.py", line 188, in verify_response
raise TM1pyException(response.text, status_code=response.status_code, reason
=response.reason)
TM1py.Exceptions.Exceptions.TM1pyException: Text: {"error":{"code":"","message":
"SystemParameterTypeInvalid"}} Status Code: 400 Reason: Bad Request

JSON (dev code removed):

{
  "Name": "Cons - Import Data Feedback",
  "PrologProcedure": "\r\n#****Begin: Generated Statements***\r\n#****End: Generated Statements****\r\n\r\n\r\n",
  "MetadataProcedure": "\r\n#****Begin: Generated Statements***\r\n#****End: Generated Statements****\r\n\r\n",
  "DataProcedure": "\r\n#****Begin: Generated Statements***\r\n#****End: Generated Statements****\r\n\r\n",
  "EpilogProcedure": "\r\n#****Begin: Generated Statements***\r\n#****End: Generated Statements****\r\n",
  "HasSecurityAccess": false,
  "UIData": "CubeAction=1511\fDataAction=1503\fCubeLogChanges=0\f",
  "DataSource": {
    "Type": "ASCII",
    "asciiDecimalSeparator": ".",
    "asciiDelimiterChar": "",
    "asciiDelimiterType": "FixedWidth",
    "asciiHeaderRecords": 0,
    "asciiQuoteCharacter": "",
    "asciiThousandSeparator": ",",
    "dataSourceNameForClient": "\\\\mlgmuc00app751\\TM1$\\global_deploy\\Log\\_.log",
    "dataSourceNameForServer": "\\\\mlgmuc00app751\\TM1$\\global_deploy\\Log\\_.log"
  },
  "Parameters": [
    {
      "Name": "pInterface",
      "Prompt": "",
      "Value": ""
    },
    {
      "Name": "pModel",
      "Prompt": "",
      "Value": ""
    },
    {
      "Name": "pDCU",
      "Prompt": "",
      "Value": ""
    },
    {
      "Name": "pProcess",
      "Prompt": "",
      "Value": ""
    },
    {
      "Name": "pError",
      "Prompt": "",
      "Value": 0
    }
  ],
  "Variables": [
    {
      "Name": "vLine1",
      "Type": "String",
      "Position": 1,
      "StartByte": 1,
      "EndByte": 100
    },
    {
      "Name": "vLine2",
      "Type": "String",
      "Position": 2,
      "StartByte": 101,
      "EndByte": 200
    },
    {
      "Name": "vLine3",
      "Type": "String",
      "Position": 3,
      "StartByte": 201,
      "EndByte": 300
    }
  ],
  "VariablesUIData": [
    "VarType=32\fColType=827\f",
    "VarType=32\fColType=827\f",
    "VarType=32\fColType=827\f"
  ]
}

Improvment of View*Selection

Hello,

In the _construct_body method, one does type dispatching base on type. First of all, one should switch the order of verification as an AnnonymousSubset is a subset and that the pythonic way should use the isinstance function.

But to respect the OOP approach about type dispatching, the method should be defined within each Subset classes and called by the View*Selection.

REST Sessions do not end if script is killed

We are testing the code to multithread the execution of processes and we noticed that if the script is ended, it will not disconnect the threads (leaving all the rest threads out there idle). Is there a way to sense the kill and handle the disconnect in the script?

Cube data

Hello

I want to get whole cube data in a data frame...I am getting data of a particular cube but how can I get whole cube data?

Thanks in advance

Internal Server Error SystemOutOfMemory

I tried exporting a TM1 cube using MDX expression but getting the below error, when I reduce the granularity of the output I'm able to export the data. The same granularity is possible when I open the cube view using Architect. But I wonder TM1PY could not handle it!

Can someone please let me know what is the dependency for this memory shortage?
Is it not possible to export an entire cube with huge data? I don't mind the time taken, but is it possible?
Note: I have installed TM1PY in my VM which has 8GB RAM, the server would have some 256GB RAM.
Data is stored in server (as always)

with TM1Service(**config['<SERVER_NAME>']) as tm1: mdx = "SELECT " \ "{[n].[o]} * {[p].[q]} * {[a].members} * {[r].members} * {[c].[c]} * {[e].[f]} * {[g].members} on ROWS, " \ "{[i].[j]:[k].[l]} ON COLUMNS " \ "FROM [m]" # Get view content content = tm1.cubes.cells.execute_mdx(mdx) dx = Utils.build_pandas_dataframe_from_cellset(content, multiindex=False)

`**---------------------------------------------------------------------------
TM1pyException Traceback (most recent call last)
in ()
23
24 # Get view content
---> 25 content = tm1.cubes.cells.execute_mdx(mdx)
26 dx = Utils.build_pandas_dataframe_from_cellset(content, multiindex=False)
27 run_time = time.time() - start_time

~\AppData\Local\Continuum\anaconda3\lib\site-packages\TM1py\Services\CellService.py in execute_mdx(self, mdx, cell_properties, top)
174 :return: content in sweet consice strcuture.
175 """
--> 176 cellset_id = self.create_cellset(mdx=mdx)
177 try:
178 return self.execute_cellset(cellset_id=cellset_id, cell_properties=cell_properties, top=top)

~\AppData\Local\Continuum\anaconda3\lib\site-packages\TM1py\Services\CellService.py in create_cellset(self, mdx)
297 'MDX': mdx
298 }
--> 299 response = self._rest.POST(request=request, data=json.dumps(data, ensure_ascii=False))
300 cellset_id = response.json()['ID']
301 return cellset_id

~\AppData\Local\Continuum\anaconda3\lib\site-packages\TM1py\Services\RESTService.py in wrapper(self, request, data)
28 response = func(self, request, data)
29 # Verify
---> 30 self.verify_response(response=response)
31 return response
32 return wrapper

~\AppData\Local\Continuum\anaconda3\lib\site-packages\TM1py\Services\RESTService.py in verify_response(response)
212 """
213 if not response.ok:
--> 214 raise TM1pyException(response.text, status_code=response.status_code, reason=response.reason)
215
216 @staticmethod

TM1pyException: Text: Error: Internal Server Error
SystemOutOfMemory

Status Code: 500 Reason: Internal Server Error**`

Understanding write cellsets

Hello,

I am starting my journey into tm1py, however I`ve been facing difficulties to send data back to tm1.

For example, if I have a simple cube with 2 dimensions (Image 1) and want to write a data from a csv file or a pandas dataframe (image 4):

cubos

Using this code it tooks more than 6 hours to write 16000 lines into the cube.

df = pd.read_csv("Dataframe.csv", encoding='utf-8')

with TM1Service(address="xxx", port="xxx", user="admin", password="xxx", namespace=None,
                ssl=True) as tm1:
    cellset = {}
    for index, row in df.iterrows():
        cellset[(row['GBL_Produto'], row['EST_Controle_Estoque_Metrica'])] = row['Value']
        tm1.cubes.cells.write_values('EST_Controle_Estoque', cellset)

However I saw samples using codes that says: Read a csv file with ~ 1000000 lines and write the data to a cube and examples using write_values_through_cellset function. But I didn`t understand exactly how to use these functions in this situation.

Login with security code 2/3

Hi Marius,

Is there a way to perform NTLM logon using TM1py?

Appreciate the work you're doing on this.

Best

Paul

Support for new ExecuteProcessWithReturn

Has the code been updated to use the new TI execution standard? Based on conversations with IBM moving to the new function will correct issues that keep minor errors from being committed

The Readme needs updation

The installation steps in the README seems out of date as there is no TM1py.py file present.
It needs to be updated.

And the init.py file also seems to be missing.

Testing the new release

I'm having trouble migrating my simplistic (but useful) server query script.
from TM1py.Utils import Utils servers = Utils.get_all_servers_from_adminhost('') print('Name','Port','HTTPPort','SSL',sep = '\t') for s in servers: print (s.name, s.port_number, s.http_port_number,s.using_ssl, sep = '\t')
gives
servers = Utils.get_all_servers_from_adminhost('') File "D:\Users\dusherwo.INFOCAT-VG\AppData\Local\Programs\Python\Python36-32\lib\site-packages\TM1py\Utils\Utils.py", line 27, in get_all_servers_from_adminhost server = Server(server_as_dict) TypeError: 'module' object is not callable
Suggestions welcome.

Hierarchy class lacks a remove_element method

Currently when removing an element from a Hierarchy object one needs to remove it explicitly from the elements property and aditionally remove all related edges from the edges property of the hierarchy object.

The TM1py user must not be bothered to write this logic. The logic needs to be incorporated into a remove_element method on the Hierarchy class.

Introduce skip_contexts (boolean) argument in execute_mdx functions

Typically when executing an MDX Query from python, elements from the WHERE statement are not required in the response data, since they are static and already determined.

Introduce a new optional skip_contexts argument to all execute_mdx / execute_view functions. If True TM1py will not query elements from the Titles / Contexts, thus reduce the response size and speed up the execution.
Defaultvalue of the argument will by False.

help: first time use

I copied the TM1py.py file to project folder. But I got following errors when running the code. Can someone help me understand the issue and how to fix it? Thank you.


from TM1py import TM1pyQueries as TM1

File "TM1py.py", line 295
´cube_name´: String
^
SyntaxError: Non-ASCII character '\xc2' in file TM1py.py on line 296, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Setup.py file not executing

Hello
I am trying to load data in tm1 through tm1py for cubike data.
After executing the file of setup.py, I am getting the following error:
TM1pyException: Text: {"error":{"code":"","message":"PATCH not supported on this resource!"}} Status Code: 400 Reason: Bad Request
Due to this, it's not possible to load data
I have followed all the steps for proper connection
My server is connected.
My rest API is also working.
Kindly tell me solution for this
Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.