compute_node.py
ComputeNode (CelonisApiObject)
¶
ComputeNode object to interact with Celonis Event Collection API.
data: Dict
property
writable
¶
ComputeNode has no data. Always returns emtpy dict.
Exceptions:
Type | Description |
---|---|
PyCelonisNotImplementedError |
when trying to set data. |
url: str
property
readonly
¶
API
GET: /integration/api/v1/compute/{datamodel_id}
name: str
inherited
property
writable
¶
Name of the object via data['name']
if available.
key: str
inherited
property
writable
¶
Key of the object via data['key']
if available.
get_data_file(self, pql_query, file_path=None, **kwargs)
¶
Exports the results of a PQL query as pyarrow.parquet.ParquetFile and returns the path to the exported file.
API
POST: /integration/api/v1/compute/{datamodel_id}/export/query
json { "dataCommand": { "commands": [ {"queries": pql_query.query} ] } }
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pql_query |
PQL |
The table query to be executed. |
required |
file_path |
Union[str, pathlib.Path] |
The output path for the export. Defaults to |
None |
Returns:
Type | Description |
---|---|
Path |
Path to downloaded file containing the results of the query. |
get_data_frame(self, pql_query, **kwargs)
¶
Exports the results of a PQL query as pyarrow.parquet.ParquetFile and converts it to a pandas.DataFrame. Uses ComputeNode.get_data_file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pql_query |
PQL |
The table query to be executed. |
required |
Returns:
Type | Description |
---|---|
DataFrame |
Dataframe containing the results of the query. |
reset_state(self)
inherited
¶
Resets data = None
.
This will force a reload of the remote resource from Celonis EMS on the next property access.
delete(self)
inherited
¶
Executes a DELETE
request to the resource API endpoint to delete the remote resource in Celonis EMS.
HybridPseudoComputeNode
¶
Hybrid ComputeNode object to interact with Celonis Hybrid Event Collection API.
get_data_file(self, pql_query, file_path=None, **kwargs)
¶
Exports the results of a PQL query as pyarrow.parquet.ParquetFile and returns the path to the exported file.
This method will create a temporary Studio Space, Package and Analysis to then export the result via Analysis.get_data_file. The temporary space will be deleted at before the result is returned. It is recommended to set up an Analysis in Studio yourself and use it to export the query result.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pql_query |
PQL |
The table query to be executed. |
required |
file_path |
Union[str, pathlib.Path] |
The output path for the export. Defaults to |
None |
Returns:
Type | Description |
---|---|
Path |
Path to downloaded file containing the results of the query. |
get_data_frame(self, pql_query, **kwargs)
¶
Exports the results of a PQL query as pyarrow.parquet.ParquetFile file and converts it to a pandas.DataFrame. Uses get_data_file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pql_query |
PQL |
The table query to be executed. |
required |
Returns:
Type | Description |
---|---|
DataFrame |
Dataframe containing the results of the query. |