I've written a basic script to access a knowledge model and want to edit its PQL and update it to the cloud.
space = celonis.studio.get_spaces().find('Value Monitoring')
package = space.get_packages().find('Value Monitoring')
knowledge_model = package.get_knowledge_models().find('Value Monitor-devFlo2')
content = knowledge_model.get_content()
kpis = knowledge_model.get_kpis()
kpiss0].pql
kpi = kpiss0]
kpi.pql = "Test"
knowledge_model.update() # local to EMS
The ML Workbench has "USE" rights on the knowledge model (no other options available) and "USE and EDIT" rights in the package.
These are the logs:
o2025-01-09 18:38:30,804] INFO: No `base_url` given. Using environment variable 'CELONIS_URL'
r2025-01-09 18:38:30,805] INFO: No `api_token` given. Using environment variable 'CELONIS_API_TOKEN'
r2025-01-09 18:38:30,853] WARNING: Your PyCelonis Version 2.11.1 is outdated (Newest Version: 2.12.0). Please upgrade the package via: pip install --extra-index-url=https://pypi.celonis.cloud/ pycelonis pycelonis_core --upgrade
r2025-01-09 18:38:30,884] WARNING: KeyType is not set. Defaulted to 'APP_KEY'.
r2025-01-09 18:38:30,904] INFO: Initial connect successful! PyCelonis Version: 2.11.1
r2025-01-09 18:38:31,123] INFO: `package-manager` permissions: n'$ACCESS_CHILD', 'EDIT_ALL_SPACES', 'MANAGE_PERMISSIONS', 'CREATE_SPACE', 'DELETE_ALL_SPACES']
r2025-01-09 18:38:31,124] INFO: `task-mining` permissions: n]
r2025-01-09 18:38:31,125] INFO: `compute-live` permissions: n]
r2025-01-09 18:38:31,125] INFO: `action-engine` permissions: n]
r2025-01-09 18:38:31,126] INFO: `workflows` permissions: n]
r2025-01-09 18:38:31,126] INFO: `team` permissions: n]
r2025-01-09 18:38:31,127] INFO: `process-repository` permissions: n]
r2025-01-09 18:38:31,127] INFO: `transformation-center` permissions: n]
r2025-01-09 18:38:31,129] INFO: `storage-manager` permissions: n]
r2025-01-09 18:38:31,129] INFO: `event-collection` permissions: n'$ACCESS_CHILD']
r2025-01-09 18:38:31,130] INFO: `user-provisioning` permissions: n]
r2025-01-09 18:38:31,131] INFO: `ml-workbench` permissions: n'USE_ALL_APPS', 'VIEW_CONFIGURATION']
Why can't I update my changes from the python notebook into the EMS?