Skip to main content

Hi there,

I would like to pull an OLAP table component out one analysis sheet into the ML bench

 

If I try this way by ID it works:

components = sheet.components

component = components.find_by_id('Component_ID_Here')

 

But I would like to import the table by name as the component ID might change.

So I tried this but it does not work.:

components = sheet.components

component = components.find('Table_Title_Here')

 

Hope you can give me a hint.

 

Best,

Conny

Hi Conny,

if you are using PyCelonis>=2.0.0 you can use the `find` method to search for any attribute of a component. By default it searches for name but you can also adjust it to search for other attributes. In your case, `title` would be the right attribute:

components.find("Table_Title_Here", search_attribute='title')

https://celonis.github.io/pycelonis/2.4.1/reference/pycelonis_core/base/collection/?h=find#pycelonis_core.base.collection.CelonisCollection.find


Hi Simon,

thank you very much for your answer. That has solved my problem.

Kind regards, Conny


Reply