Class ElasticsearchTransformAsyncClient

java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchTransformAsyncClient>
co.elastic.clients.elasticsearch.transform.ElasticsearchTransformAsyncClient
All Implemented Interfaces:
Closeable, AutoCloseable

public class ElasticsearchTransformAsyncClient extends ApiClient<ElasticsearchTransport,ElasticsearchTransformAsyncClient>
Client for the transform namespace.
  • Constructor Details

  • Method Details

    • withTransportOptions

      public ElasticsearchTransformAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions)
      Description copied from class: ApiClient
      Creates a new client with some request options
      Specified by:
      withTransportOptions in class ApiClient<ElasticsearchTransport,ElasticsearchTransformAsyncClient>
    • deleteTransform

      Delete a transform.
      See Also:
    • deleteTransform

      Delete a transform.
      Parameters:
      fn - a function that initializes a builder to create the DeleteTransformRequest
      See Also:
    • getTransform

      Get transforms. Get configuration information for transforms.
      See Also:
    • getTransform

      Get transforms. Get configuration information for transforms.
      Parameters:
      fn - a function that initializes a builder to create the GetTransformRequest
      See Also:
    • getTransform

      public CompletableFuture<GetTransformResponse> getTransform()
      Get transforms. Get configuration information for transforms.
      See Also:
    • getTransformStats

      Get transform stats.

      Get usage information for transforms.

      See Also:
    • getTransformStats

      Get transform stats.

      Get usage information for transforms.

      Parameters:
      fn - a function that initializes a builder to create the GetTransformStatsRequest
      See Also:
    • previewTransform

      public <TTransform> CompletableFuture<PreviewTransformResponse<TTransform>> previewTransform(PreviewTransformRequest request, Class<TTransform> tTransformClass)
      Preview a transform. Generates a preview of the results that you will get when you create a transform with the same configuration.

      It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also generates a list of mappings and settings for the destination index. These values are determined based on the field types of the source index and the transform aggregations.

      See Also:
    • previewTransform

      public final <TTransform> CompletableFuture<PreviewTransformResponse<TTransform>> previewTransform(Function<PreviewTransformRequest.Builder,ObjectBuilder<PreviewTransformRequest>> fn, Class<TTransform> tTransformClass)
      Preview a transform. Generates a preview of the results that you will get when you create a transform with the same configuration.

      It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also generates a list of mappings and settings for the destination index. These values are determined based on the field types of the source index and the transform aggregations.

      Parameters:
      fn - a function that initializes a builder to create the PreviewTransformRequest
      See Also:
    • previewTransform

      public <TTransform> CompletableFuture<PreviewTransformResponse<TTransform>> previewTransform(PreviewTransformRequest request, Type tTransformType)
      Preview a transform. Generates a preview of the results that you will get when you create a transform with the same configuration.

      It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also generates a list of mappings and settings for the destination index. These values are determined based on the field types of the source index and the transform aggregations.

      See Also:
    • previewTransform

      public final <TTransform> CompletableFuture<PreviewTransformResponse<TTransform>> previewTransform(Function<PreviewTransformRequest.Builder,ObjectBuilder<PreviewTransformRequest>> fn, Type tTransformType)
      Preview a transform. Generates a preview of the results that you will get when you create a transform with the same configuration.

      It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also generates a list of mappings and settings for the destination index. These values are determined based on the field types of the source index and the transform aggregations.

      Parameters:
      fn - a function that initializes a builder to create the PreviewTransformRequest
      See Also:
    • putTransform

      Create a transform. Creates a transform.

      A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a unique row per entity.

      You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values in the latest object.

      You must have create_index, index, and read privileges on the destination index and read and view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the time of creation and uses those same roles. If those roles do not have the required privileges on the source and destination indices, the transform fails when it attempts unauthorized operations.

      NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not give users any privileges on .data-frame-internal* indices.

      See Also:
    • putTransform

      Create a transform. Creates a transform.

      A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a unique row per entity.

      You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values in the latest object.

      You must have create_index, index, and read privileges on the destination index and read and view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the time of creation and uses those same roles. If those roles do not have the required privileges on the source and destination indices, the transform fails when it attempts unauthorized operations.

      NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not give users any privileges on .data-frame-internal* indices.

      Parameters:
      fn - a function that initializes a builder to create the PutTransformRequest
      See Also:
    • resetTransform

      Reset a transform.

      Before you can reset it, you must stop it; alternatively, use the force query parameter. If the destination index was created by the transform, it is deleted.

      See Also:
    • resetTransform

      Reset a transform.

      Before you can reset it, you must stop it; alternatively, use the force query parameter. If the destination index was created by the transform, it is deleted.

      Parameters:
      fn - a function that initializes a builder to create the ResetTransformRequest
      See Also:
    • scheduleNowTransform

      Schedule a transform to start now.

      Instantly run a transform to process data. If you run this API, the transform will process the new data instantly, without waiting for the configured frequency interval. After the API is called, the transform will be processed again at now + frequency unless the API is called again in the meantime.

      See Also:
    • scheduleNowTransform

      Schedule a transform to start now.

      Instantly run a transform to process data. If you run this API, the transform will process the new data instantly, without waiting for the configured frequency interval. After the API is called, the transform will be processed again at now + frequency unless the API is called again in the meantime.

      Parameters:
      fn - a function that initializes a builder to create the ScheduleNowTransformRequest
      See Also:
    • startTransform

      Start a transform.

      When you start a transform, it creates the destination index if it does not already exist. The number_of_shards is set to 1 and the auto_expand_replicas is set to 0-1. If it is a pivot transform, it deduces the mapping definitions for the destination index from the source indices and the transform aggregations. If fields in the destination index are derived from scripts (as in the case of scripted_metric or bucket_script aggregations), the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings in a pivot transform.

      When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you created the transform, they occur when you start the transform—​with the exception of privilege checks. When Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the time of creation and uses those same roles. If those roles do not have the required privileges on the source and destination indices, the transform fails when it attempts unauthorized operations.

      See Also:
    • startTransform

      Start a transform.

      When you start a transform, it creates the destination index if it does not already exist. The number_of_shards is set to 1 and the auto_expand_replicas is set to 0-1. If it is a pivot transform, it deduces the mapping definitions for the destination index from the source indices and the transform aggregations. If fields in the destination index are derived from scripts (as in the case of scripted_metric or bucket_script aggregations), the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings in a pivot transform.

      When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you created the transform, they occur when you start the transform—​with the exception of privilege checks. When Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the time of creation and uses those same roles. If those roles do not have the required privileges on the source and destination indices, the transform fails when it attempts unauthorized operations.

      Parameters:
      fn - a function that initializes a builder to create the StartTransformRequest
      See Also:
    • stopTransform

      Stop transforms. Stops one or more transforms.
      See Also:
    • stopTransform

      Stop transforms. Stops one or more transforms.
      Parameters:
      fn - a function that initializes a builder to create the StopTransformRequest
      See Also:
    • updateTransform

      Update a transform. Updates certain properties of a transform.

      All updated properties except description do not take effect until after the transform starts the next checkpoint, thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata privileges for the source indices. You must also have index and read privileges for the destination index. When Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the time of update and runs with those privileges.

      See Also:
    • updateTransform

      Update a transform. Updates certain properties of a transform.

      All updated properties except description do not take effect until after the transform starts the next checkpoint, thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata privileges for the source indices. You must also have index and read privileges for the destination index. When Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the time of update and runs with those privileges.

      Parameters:
      fn - a function that initializes a builder to create the UpdateTransformRequest
      See Also:
    • upgradeTransforms

      Upgrade all transforms.

      Transforms are compatible across minor versions and between supported major versions. However, over time, the format of transform configuration information may change. This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. It also cleans up the internal data structures that store the transform state and checkpoints. The upgrade does not affect the source and destination indices. The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged.

      If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue. Resolve the issue then re-run the process again. A summary is returned when the upgrade is finished.

      To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster. You may want to perform a recent cluster backup prior to the upgrade.

      See Also:
    • upgradeTransforms

      Upgrade all transforms.

      Transforms are compatible across minor versions and between supported major versions. However, over time, the format of transform configuration information may change. This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. It also cleans up the internal data structures that store the transform state and checkpoints. The upgrade does not affect the source and destination indices. The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged.

      If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue. Resolve the issue then re-run the process again. A summary is returned when the upgrade is finished.

      To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster. You may want to perform a recent cluster backup prior to the upgrade.

      Parameters:
      fn - a function that initializes a builder to create the UpgradeTransformsRequest
      See Also:
    • upgradeTransforms

      public CompletableFuture<UpgradeTransformsResponse> upgradeTransforms()
      Upgrade all transforms.

      Transforms are compatible across minor versions and between supported major versions. However, over time, the format of transform configuration information may change. This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. It also cleans up the internal data structures that store the transform state and checkpoints. The upgrade does not affect the source and destination indices. The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged.

      If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue. Resolve the issue then re-run the process again. A summary is returned when the upgrade is finished.

      To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster. You may want to perform a recent cluster backup prior to the upgrade.

      See Also: