Class PutTransformRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class PutTransformRequest extends RequestBase implements JsonpSerializable
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:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPutTransformRequest.BuilderBuilder forPutTransformRequest.Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<PutTransformRequest>_DESERIALIZERJson deserializer forPutTransformRequeststatic Endpoint<PutTransformRequest,PutTransformResponse,ErrorResponse>_ENDPOINTEndpoint "transform.put_transform". -
Method Summary
Modifier and Type Method Description java.lang.BooleandeferValidation()When the transform is created, a series of validations occur to ensure its success.java.lang.Stringdescription()Free text description of the transform.Destinationdest()Required - The destination for the transform.Timefrequency()The interval between checks for changes in the source indices when the transform is running continuously.Latestlatest()The latest method transforms the data by finding the latest document for each unique key.java.util.Map<java.lang.String,java.lang.String>meta()Defines optional transform metadata.static PutTransformRequestof(java.util.function.Function<PutTransformRequest.Builder,ObjectBuilder<PutTransformRequest>> fn)Pivotpivot()The pivot method transforms the data by aggregating and grouping it.RetentionPolicyretentionPolicy()Defines a retention policy for the transform.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Settingssettings()Defines optional transform settings.protected static voidsetupPutTransformRequestDeserializer(ObjectDeserializer<PutTransformRequest.Builder> op)Sourcesource()Required - The source of the data for the transform.Syncsync()Defines the properties transforms require to run continuously.Timetimeout()Period to wait for a response.java.lang.StringtransformId()Required - Identifier for the transform.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forPutTransformRequest -
_ENDPOINT
Endpoint "transform.put_transform".
-
-
Method Details
-
of
public static PutTransformRequest of(java.util.function.Function<PutTransformRequest.Builder,ObjectBuilder<PutTransformRequest>> fn) -
meta
public final java.util.Map<java.lang.String,java.lang.String> meta()Defines optional transform metadata.API name:
_meta -
deferValidation
@Nullable public final java.lang.Boolean deferValidation()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.API name:
defer_validation -
description
@Nullable public final java.lang.String description()Free text description of the transform.API name:
description -
dest
Required - The destination for the transform.API name:
dest -
frequency
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 is1sand the maximum is1h.API name:
frequency -
latest
The latest method transforms the data by finding the latest document for each unique key.API name:
latest -
pivot
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.API name:
pivot -
retentionPolicy
Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the destination index.API name:
retention_policy -
settings
Defines optional transform settings.API name:
settings -
source
Required - The source of the data for the transform.API name:
source -
sync
Defines the properties transforms require to run continuously.API name:
sync -
timeout
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout -
transformId
public final java.lang.String transformId()Required - 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.API name:
transform_id -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupPutTransformRequestDeserializer
protected static void setupPutTransformRequestDeserializer(ObjectDeserializer<PutTransformRequest.Builder> op)
-