Firstly I wrote the following code: space = celonis.apps.get_spaces().find('Accounts Payable')
package = space.get_packages().find('Accounts Payable Starter Kit')
analysis = package.get_analyses().find('Process Cockpit Advanced')
content = package.get_analysis(analysis.id).get_content()
data_model_id = content.data_model_id
I got this output from the code above:
[2024-06-26 11:01:22,515] INFO: `get_analyses` returns analyses without content. To fetch the content for a specific analysis call`analysis.sync()` or use `package.get_analysis(analysis_id)`
And then I run the following codes:
sheets = content.draft.document.components
sheet = sheets.find('Activities') -It worked.
components = sheet.components
component = components.find("APTable")
Finally, I got this error:
---------------------------------------------------------------------------
PyCelonisNotFoundError Traceback (most recent call last)
Input In [21], in <cell line: 2>()
1 components = sheet.components
----> 2 component = components.find("APTable")
File ~/.local/lib/python3.8/site-packages/pycelonis_core/base/collection.py:75, in CelonisCollection.find(self, search_term, search_attribute, default)
73 if default:
74 return default
---> 75 raise PyCelonisNotFoundError(f"No object found for '{search_attribute}'='{search_term}'.")
77 if len(found_objects) == 1:
78 return found_objects[0]
PyCelonisNotFoundError: No object found for 'name'='APTable'.
I am sure that we have an OLAP table in the published sheet in package.
Also, how can I find the "OLAP_Table_ID" . I wanted to use this option but I couldn't find the ID:
components = sheet.components
component = components.find_by_id('Component_ID_Here')
Thank you very much in advance.