The error message states: "Data Export not enabled or missing permissions. Please check permissions or contact Celonis customer support."
As an admin, I have verified that all permissions are correctly set. I'm not sure how to proceed from here. Has anyone encountered a similar issue or can provide some guidance on resolving this error? Any help would be greatly appreciated.
Thank you!
the error output :
---------------------------------------------------------------------------
PyCelonisPermissionError Traceback (most recent call last)
File ~/.local/lib/python3.8/site-packages/pycelonis/ems/data_integration/data_model.py:430, in DataModel.create_data_export(self, query, export_type, query_environment)
429 try:
--> 430 data_export_transport = IntegrationService.post_api_v1_compute_data_model_id_export_query(
431 self.client, self.id, data_export_request
432 )
433 except PyCelonisPermissionError as e:
File ~/.local/lib/python3.8/site-packages/pycelonis/service/integration/service.py:2311, in IntegrationService.post_api_v1_compute_data_model_id_export_query(client, data_model_id, request_body)
2302 logger.debug(
2303 f"Request: 'POST' -> '/integration/api/v1/compute/{data_model_id}/export/query'",
2304 extra={
(...)
2308 },
2309 )
-> 2311 return client.request(
2312 method="POST",
2313 url=f"/integration/api/v1/compute/{data_model_id}/export/query",
2314 request_body=request_body,
2315 parse_json=True,
2316 type_=DataExportStatusResponse,
2317 )
File ~/.local/lib/python3.8/site-packages/pycelonis_core/client/client.py:154, in Client.request(self, method, url, content, data, files, json, params, headers, cookies, timeout, follow_redirects, type_, parse_json, request_body)
153 response = self.client.send(request, follow_redirects=follow_redirects)
--> 154 return self._response_processor.process(response=response, type_=type_, parse_json=parse_json)
File ~/.local/lib/python3.8/site-packages/pycelonis_core/client/response_processor.py:32, in ResponseProcessor.process(self, response, type_, parse_json)
31 """Verifies whether response is valid and parses response body if parse_json=True."""
---> 32 self._verify_response(response)
34 if parse_json:
File ~/.local/lib/python3.8/site-packages/pycelonis_core/client/response_processor.py:42, in ResponseProcessor._verify_response(self, response)
41 message = f"You don't have permission to perform '{response.request.method}' -> '{response.request.url}'."
---> 42 raise PyCelonisPermissionError(message)
44 if response.status_code == 404:
PyCelonisPermissionError: You don't have permission to perform 'POST' -> 'https://estabil-axa-sigorta-c4c.eu-1.celonis.cloud/integration/api/v1/compute/0cd69567-c15f-4dd0-add1-f03c837b6e89/export/query'.
The above exception was the direct cause of the following exception:
PyCelonisDataExportNotEnabledError Traceback (most recent call last)
File ~/.local/lib/python3.8/site-packages/saolapy/saola_connector.py:25, in SaolaConnector.export_data(self, query, distinct, limit, offset)
24 try:
---> 25 exported_data = self._export_data(query)
26 except Exception as e:
File ~/.local/lib/python3.8/site-packages/pycelonis/pql/saola_connector.py:115, in AnalysisSaolaConnector._export_data(self, query)
114 data_query, query_environment = self.analysis._resolve_query(query)
--> 115 return self.data_model._export_data_frame(data_query, query_environment)
File ~/.local/lib/python3.8/site-packages/pycelonis/ems/data_integration/data_model.py:493, in DataModel._export_data_frame(self, query, query_environment)
490 def _export_data_frame(
491 self, query: typing.UnioniDataQuery, PQL], query_environment: typing.Optional.QueryEnvironment] = None
492 ) -> pd.DataFrame:
--> 493 data_export = self.create_data_export(query, ExportType.PARQUET, query_environment=query_environment)
495 data_export.wait_for_execution()
File ~/.local/lib/python3.8/site-packages/pycelonis/ems/data_integration/data_model.py:434, in DataModel.create_data_export(self, query, export_type, query_environment)
433 except PyCelonisPermissionError as e:
--> 434 raise PyCelonisDataExportNotEnabledError() from e
436 logger.info("Successfully created data export with id '%s'", data_export_transport.id)
PyCelonisDataExportNotEnabledError: Data Export not enabled or missing permissions. Please check permissions or contact Celonis customer support.
The above exception was the direct cause of the following exception:
DataExportFailedError Traceback (most recent call last)
Input In >14], in <cell line: 5>()
2 from pycelonis.pql.saola_connector import AnalysisSaolaConnector
4 df = pql.DataFrame.from_pql(query, saola_connector=AnalysisSaolaConnector(data_model, analysis))
----> 5 df.head()
File ~/.local/lib/python3.8/site-packages/saolapy/pandas/data_frame.py:329, in DataFrame.head(self, n)
320 def head(self, n: int = 5) -> pd.DataFrame:
321 """Returns the first n rows based on position as pandas DataFrame.
322
323 Args:
(...)
327 First n rows as pandas DataFrame.
328 """
--> 329 return self.to_pandas(limit=n)
File ~/.local/lib/python3.8/site-packages/pycelonis/pql/data_frame.py:44, in DataFrame.to_pandas(self, *args, **kwargs)
42 def to_pandas(self, *args: Any, **kwargs: Any) -> pd.DataFrame:
43 """Exports data from data model."""
---> 44 df = super().to_pandas(*args, **kwargs)
45 internal_tracking_logger.debug(
46 "Exported DataFrame.",
47 extra={"nrows": df.shapeq0], "ncolumns": df.shapeq1], "tracking_type": "SAOLAPY_EXPORT"},
48 )
49 return df
File ~/.local/lib/python3.8/site-packages/saolapy/pandas/data_frame.py:338, in DataFrame.to_pandas(self, distinct, limit, offset)
335 if self.ncolumns == 0:
336 return pd.DataFrame()
--> 338 exported_data = self.saola_connector.export_data(self.query, distinct=distinct, limit=limit, offset=offset)
339 exported_data = exported_data.set_index(self.index.query_column_names, drop=True)
340 return exported_data
File ~/.local/lib/python3.8/site-packages/saolapy/saola_connector.py:27, in SaolaConnector.export_data(self, query, distinct, limit, offset)
25 exported_data = self._export_data(query)
26 except Exception as e:
---> 27 raise DataExportFailedError(
28 f"Data export failed for query:\\n{query.queries}\\n\\n{getattr(e, 'message', str(e))}"
29 ) from e
31 if limit is not None:
32 # This is necessary due to LIMIT bug in PQL where an additional row is exported
33 exported_data = exported_data.head(limit)
DataExportFailedError: Data export failed for query:
'TABLE (\\n0 - 1 + RUNNING_TOTAL(1) AS "Index",\\n"CASE_TABLE_TRACKING"."PROVISION_TYPE" AS "CASE_TABLE.PROVISION_TYPE",\\nAVG(CALC_THROUGHPUT(ALL_OCCURRENCEP\\'Process Start\\'] TO ALL_OCCURRENCE \\'Process End\\'], REMAP_TIMESTAMPS("_CEL_TR_ACTIVITIES_TRACKING"."_EVENTTIME", DAYS))) AS "Total throughput time in days",\\nCOUNT_TABLE("CASE_TABLE_TRACKING") AS "Case count"\\n)\\nORDER BY AVG(CALC_THROUGHPUT(ALL_OCCURRENCEP\\'Process Start\\'] TO ALL_OCCURRENCE \\'Process End\\'], REMAP_TIMESTAMPS("_CEL_TR_ACTIVITIES_TRACKING"."_EVENTTIME", DAYS))) DESC\\nLIMIT 5;']
Data Export not enabled or missing permissions. Please check permissions or contact Celonis customer support.