Transforms

class elasticsearch.client.TransformClient(client)
Parameters:

client (BaseClient)

delete_transform(*, transform_id, delete_dest_index=None, error_trace=None, filter_path=None, force=None, human=None, pretty=None, timeout=None)

Deletes an existing transform.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/delete-transform.html

Parameters:
  • transform_id (str) – Identifier for the transform.

  • delete_dest_index (bool | None) – If this value is true, the destination index is deleted together with the transform. If false, the destination index will not be deleted

  • force (bool | None) – If this value is false, the transform must be stopped before it can be deleted. If true, the transform is deleted regardless of its current state.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

get_transform(*, transform_id=None, allow_no_match=None, error_trace=None, exclude_generated=None, filter_path=None, from_=None, human=None, pretty=None, size=None)

Retrieves configuration information for transforms.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/get-transform.html

Parameters:
  • transform_id (str | Sequence[str] | None) – Identifier for the transform. It can be a transform identifier or a wildcard expression. You can get information for all transforms by using _all, by specifying * as the <transform_id>, or by omitting the <transform_id>.

  • allow_no_match (bool | None) – Specifies what to do when the request: 1. Contains wildcard expressions and there are no transforms that match. 2. Contains the _all string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. If this parameter is false, the request returns a 404 status code when there are no matches or only partial matches.

  • exclude_generated (bool | None) – Excludes fields that were automatically added when creating the transform. This allows the configuration to be in an acceptable format to be retrieved and then added to another cluster.

  • from – Skips the specified number of transforms.

  • size (int | None) – Specifies the maximum number of transforms to obtain.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • from_ (int | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

get_transform_stats(*, transform_id, allow_no_match=None, error_trace=None, filter_path=None, from_=None, human=None, pretty=None, size=None, timeout=None)

Retrieves usage information for transforms.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/get-transform-stats.html

Parameters:
  • transform_id (str | Sequence[str]) – Identifier for the transform. It can be a transform identifier or a wildcard expression. You can get information for all transforms by using _all, by specifying * as the <transform_id>, or by omitting the <transform_id>.

  • allow_no_match (bool | None) – Specifies what to do when the request: 1. Contains wildcard expressions and there are no transforms that match. 2. Contains the _all string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. If this parameter is false, the request returns a 404 status code when there are no matches or only partial matches.

  • from – Skips the specified number of transforms.

  • size (int | None) – Specifies the maximum number of transforms to obtain.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Controls the time to wait for the stats

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • from_ (int | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

preview_transform(*, transform_id=None, description=None, dest=None, error_trace=None, filter_path=None, frequency=None, human=None, latest=None, pivot=None, pretty=None, retention_policy=None, settings=None, source=None, sync=None, timeout=None, body=None)

Previews a transform.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/preview-transform.html

Parameters:
  • transform_id (str | None) – Identifier for the transform to preview. If you specify this path parameter, you cannot provide transform configuration details in the request body.

  • description (str | None) – Free text description of the transform.

  • dest (Mapping[str, Any] | None) – The destination for the transform.

  • frequency (Literal[-1] | ~typing.Literal[0] | str | None) – The interval between checks for changes in the source indices when the transform is running continuously. Also determines the retry interval in the event of transient failures while the transform is searching or indexing. The minimum value is 1s and the maximum is 1h.

  • latest (Mapping[str, Any] | None) – The latest method transforms the data by finding the latest document for each unique key.

  • pivot (Mapping[str, Any] | None) – The pivot method transforms the data by aggregating and grouping it. These objects define the group by fields and the aggregation to reduce the data.

  • retention_policy (Mapping[str, Any] | None) – Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the destination index.

  • settings (Mapping[str, Any] | None) – Defines optional transform settings.

  • source (Mapping[str, Any] | None) – The source of the data for the transform.

  • sync (Mapping[str, Any] | None) – Defines the properties transforms require to run continuously.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

  • body (Dict[str, Any] | None)

Return type:

ObjectApiResponse[Any]

put_transform(*, transform_id, dest=None, source=None, defer_validation=None, description=None, error_trace=None, filter_path=None, frequency=None, human=None, latest=None, meta=None, pivot=None, pretty=None, retention_policy=None, settings=None, sync=None, timeout=None, body=None)

Instantiates a transform.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/put-transform.html

Parameters:
  • transform_id (str) – Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters.

  • dest (Mapping[str, Any] | None) – The destination for the transform.

  • source (Mapping[str, Any] | None) – The source of the data for the transform.

  • defer_validation (bool | None) – When the transform is created, a series of validations occur to ensure its success. For example, there is a check for the existence of the source indices and a check that the destination index is not part of the source index pattern. You can use this parameter to skip the checks, for example when the source index does not exist until after the transform is created. The validations are always run when you start the transform, however, with the exception of privilege checks.

  • description (str | None) – Free text description of the transform.

  • frequency (Literal[-1] | ~typing.Literal[0] | str | None) – The interval between checks for changes in the source indices when the transform is running continuously. Also determines the retry interval in the event of transient failures while the transform is searching or indexing. The minimum value is 1s and the maximum is 1h.

  • latest (Mapping[str, Any] | None) – The latest method transforms the data by finding the latest document for each unique key.

  • meta (Mapping[str, Any] | None) – Defines optional transform metadata.

  • pivot (Mapping[str, Any] | None) – The pivot method transforms the data by aggregating and grouping it. These objects define the group by fields and the aggregation to reduce the data.

  • retention_policy (Mapping[str, Any] | None) – Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the destination index.

  • settings (Mapping[str, Any] | None) – Defines optional transform settings.

  • sync (Mapping[str, Any] | None) – Defines the properties transforms require to run continuously.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

  • body (Dict[str, Any] | None)

Return type:

ObjectApiResponse[Any]

reset_transform(*, transform_id, error_trace=None, filter_path=None, force=None, human=None, pretty=None)

Resets an existing transform.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/reset-transform.html

Parameters:
  • transform_id (str) – Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters.

  • force (bool | None) – If this value is true, the transform is reset regardless of its current state. If it’s false, the transform must be stopped before it can be reset.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

schedule_now_transform(*, transform_id, error_trace=None, filter_path=None, human=None, pretty=None, timeout=None)

Schedules now a transform.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/schedule-now-transform.html

Parameters:
  • transform_id (str) – Identifier for the transform.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Controls the time to wait for the scheduling to take place

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

start_transform(*, transform_id, error_trace=None, filter_path=None, from_=None, human=None, pretty=None, timeout=None)

Starts one or more transforms.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/start-transform.html

Parameters:
  • transform_id (str) – Identifier for the transform.

  • from – Restricts the set of transformed entities to those changed after this time. Relative times like now-30d are supported. Only applicable for continuous transforms.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • from_ (str | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

stop_transform(*, transform_id, allow_no_match=None, error_trace=None, filter_path=None, force=None, human=None, pretty=None, timeout=None, wait_for_checkpoint=None, wait_for_completion=None)

Stops one or more transforms.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/stop-transform.html

Parameters:
  • transform_id (str) – Identifier for the transform. To stop multiple transforms, use a comma-separated list or a wildcard expression. To stop all transforms, use _all or * as the identifier.

  • allow_no_match (bool | None) – Specifies what to do when the request: contains wildcard expressions and there are no transforms that match; contains the _all string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches. If it is true, the API returns a successful acknowledgement message when there are no matches. When there are only partial matches, the API stops the appropriate transforms. If it is false, the request returns a 404 status code when there are no matches or only partial matches.

  • force (bool | None) – If it is true, the API forcefully stops the transforms.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response when wait_for_completion is true. If no response is received before the timeout expires, the request returns a timeout exception. However, the request continues processing and eventually moves the transform to a STOPPED state.

  • wait_for_checkpoint (bool | None) – If it is true, the transform does not completely stop until the current checkpoint is completed. If it is false, the transform stops as soon as possible.

  • wait_for_completion (bool | None) – If it is true, the API blocks until the indexer state completely stops. If it is false, the API returns immediately and the indexer is stopped asynchronously in the background.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

update_transform(*, transform_id, defer_validation=None, description=None, dest=None, error_trace=None, filter_path=None, frequency=None, human=None, meta=None, pretty=None, retention_policy=None, settings=None, source=None, sync=None, timeout=None, body=None)

Updates certain properties of a transform.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/update-transform.html

Parameters:
  • transform_id (str) – Identifier for the transform.

  • defer_validation (bool | None) – When true, deferrable validations are not run. This behavior may be desired if the source index does not exist until after the transform is created.

  • description (str | None) – Free text description of the transform.

  • dest (Mapping[str, Any] | None) – The destination for the transform.

  • frequency (Literal[-1] | ~typing.Literal[0] | str | None) – The interval between checks for changes in the source indices when the transform is running continuously. Also determines the retry interval in the event of transient failures while the transform is searching or indexing. The minimum value is 1s and the maximum is 1h.

  • meta (Mapping[str, Any] | None) – Defines optional transform metadata.

  • retention_policy (None | Mapping[str, Any]) – Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the destination index.

  • settings (Mapping[str, Any] | None) – Defines optional transform settings.

  • source (Mapping[str, Any] | None) – The source of the data for the transform.

  • sync (Mapping[str, Any] | None) – Defines the properties transforms require to run continuously.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

  • body (Dict[str, Any] | None)

Return type:

ObjectApiResponse[Any]

upgrade_transforms(*, dry_run=None, error_trace=None, filter_path=None, human=None, pretty=None, timeout=None)

Upgrades all transforms.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/upgrade-transforms.html

Parameters:
  • dry_run (bool | None) – When true, the request checks for updates but does not run them.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]