Skip to content

task

Module to interact with tasks.

This module contains class to interact with a task in EMS data integration.

Typical usage example
task = data_job.create_task("TEST_TASK", TaskType.TRANSFORMATION, "TEST_DESCRIPTION")
transformation = data_job.create_transformation("TEST_TRANSFORMATION")
transformation.delete()

Task

Bases: TaskInstanceTransport

Task object to interact with task specific data integration endpoints.

client class-attribute

client: Client = Field(Ellipsis, exclude=True)

id class-attribute

id: str

pool_id class-attribute

pool_id: str

job_id class-attribute

job_id: str

task_id class-attribute

task_id: str

from_transport classmethod

from_transport(client, task_instance_transport)

Creates high-level task object from given TaskTransport.

Parameters:

  • client (Client) –

    Client to use to make API calls for given job.

  • task_instance_transport (TaskInstanceTransport) –

    TaskInstanceTransport object containing properties of task.

Returns:

  • Task

    A Task object with properties from transport and given client.

data_pool_id writable property

data_pool_id()

Returns id of data pool for given task.

update

update()

Pushes local changes of task to EMS and updates properties with response from EMS.

sync

sync()

Syncs task properties with EMS.

delete

delete()

Deletes task.

enable

enable()

Enables task.

disable

disable()

Disables task.

Extraction

Bases: Task

Extraction object to interact with extraction specific data integration endpoints.

client class-attribute

client: Client = Field(Ellipsis, exclude=True)

id class-attribute

id: str

pool_id class-attribute

pool_id: str

job_id class-attribute

job_id: str

task_id class-attribute

task_id: str

create_table_extraction

create_table_extraction(
    table_name, schema_name=None, **kwargs
)

Creates table extraction in given data job.

Parameters:

  • table_name (str) –

    Name of table to extract.

  • schema_name (typing.Optional[str]) –

    Name of schema where table is located.

  • **kwargs (typing.Any) –

    Additional parameters set for TableExtractionTransport object.

Returns:

  • TableExtraction

    A TableExtraction object for newly created table extraction.

Raises:

get_table_extraction

get_table_extraction(id_)

Gets table extraction with given id.

Parameters:

  • id_ (str) –

    Id of table extraction.

Returns:

  • TableExtraction

    A TableExtraction object for table extraction with given id.

get_table_extractions

get_table_extractions()

Gets all table extractions of given data job.

Returns:

  • CelonisCollection[TableExtraction]

    A list containing all table extractions.

Transformation

Bases: Task

Transformation object to interact with transformation specific data integration endpoints.

get_statement

get_statement()

Gets statement of task.

update_statement

update_statement(statement)

Updates statement of task.

Parameters:

  • statement (str) –

    new statement of task.