Skip to content

data_extraction.py

Extraction (CelonisApiObjectChild)

Extraction object to interact with Celonis Event Collection Extraction API.

url: str property readonly

API

  • /integration/api/pools/{pool_id}/jobs/{job_id}/extractions/{extraction_id}/expanded

tables: CelonisCollection[ExtractionTable] property readonly

Get all Tables from Extraction.

Returns:

Type Description
CelonisCollection[ExtractionTable]

Collection of Extraction Tables.

variables: Dict property readonly

Get all Pool Variables.

API

  • GET: /integration/api/pools/{pool_id}/tasks/{self.id}/variables/

Returns:

Type Description
Dict

Dictionary of Pool variables..

add_table(self, table, schema_name=None)

Adds a table to the Extraction.

Parameters:

Name Type Description Default
table Union[str, Dict, ExtractionTable]
  • str: should be table name.
  • dict: should be dictionary with values:
    {
        "schemaName": "",
        "tableName": ""
    }
    
  • ExtractionTable: extracts from data
required
schema_name str

Schema name, as for example necessary for JDBC connections.

None

Returns:

Type Description
ExtractionTable

The newly created Extraction Table.

create_extraction_parameter(self, variable)

Creates a new Variable with the specified properties in the Extraction.

API

  • POST: /integration/api/pools/{pool_id}/tasks/{transformation_id}/variables
        {
            "dataType": "<DATE|DOUBLE|INT|STRING|COLUMN|QUALIFIED_COLUMN|
                        LIST_DOUBLE|LIST_INT|LIST_STRING|NULL>",
            "name": "",
            "type": "<PRIVATE_CONSTANT|PUBLIC_CONSTANT|DYNAMIC>",
            "description": "",
            "settings": {
                "poolVariableID": ""
            },
            "placeholder": "",
            "values": [
                {"value": ""},...
            ],
            "defaultValues": [],
            "dynamicColumn": "",
            "dynamicTable": "",
            "dynamicVariableOpType": "<FIND_MAX|FIND_MIN|LIST>",
            "parameterType": "<CUSTOM|DATASOURCE>"
        }
    

Parameters:

Name Type Description Default
variable Dict

Dictionary.

required

Returns:

Type Description
Dict

The newly created Variable as Dictionary.

ExtractionTable (CelonisDataObject)

data: Dict property readonly

Extraction table data.

filter: Dict property readonly

Extraction table filter Definition.

delta_filter: Dict property readonly

Extraction table delta filter Definition.