Files
elasticsearch-js/docs/reference-shared-types-transform-types.asciidoc
2024-12-05 14:46:52 -06:00

230 lines
10 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[[reference-shared-types-transform-types]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
== Shared Transform types
[discrete]
[[TransformDestination]]
=== TransformDestination
[pass]
++++
<pre>
++++
interface TransformDestination {
pass:[/**] @property index The destination index for the transform. The mappings of the destination index are deduced based on the source fields when possible. If alternate mappings are required, use the create index API prior to starting the transform. */
index?: <<IndexName>>
pass:[/**] @property pipeline The unique identifier for an ingest pipeline. */
pipeline?: string
}
[pass]
++++
</pre>
++++
[discrete]
[[TransformLatest]]
=== TransformLatest
[pass]
++++
<pre>
++++
interface TransformLatest {
pass:[/**] @property sort Specifies the date field that is used to identify the latest documents. */
sort: <<Field>>
pass:[/**] @property unique_key Specifies an array of one or more fields that are used to group the data. */
unique_key: <<Field>>[]
}
[pass]
++++
</pre>
++++
[discrete]
[[TransformPivot]]
=== TransformPivot
[pass]
++++
<pre>
++++
interface TransformPivot {
pass:[/**] @property aggregations Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted average. */
aggregations?: Record<string, <<AggregationsAggregationContainer>>>
pass:[/**] @property aggs Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted average. */
aggs?: Record<string, <<AggregationsAggregationContainer>>>
pass:[/**] @property group_by Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are currently supported: date histogram, geotile grid, histogram, terms. */
group_by?: Record<string, <<TransformPivotGroupByContainer>>>
}
[pass]
++++
</pre>
++++
[discrete]
[[TransformPivotGroupByContainer]]
=== TransformPivotGroupByContainer
[pass]
++++
<pre>
++++
interface TransformPivotGroupByContainer {
date_histogram?: <<AggregationsDateHistogramAggregation>>
geotile_grid?: <<AggregationsGeoTileGridAggregation>>
histogram?: <<AggregationsHistogramAggregation>>
terms?: <<AggregationsTermsAggregation>>
}
[pass]
++++
</pre>
++++
[discrete]
[[TransformRetentionPolicy]]
=== TransformRetentionPolicy
[pass]
++++
<pre>
++++
interface TransformRetentionPolicy {
pass:[/**] @property field The date field that is used to calculate the age of the document. */
field: <<Field>>
pass:[/**] @property max_age Specifies the maximum age of a document in the destination index. Documents that are older than the configured value are removed from the destination index. */
max_age: <<Duration>>
}
[pass]
++++
</pre>
++++
[discrete]
[[TransformRetentionPolicyContainer]]
=== TransformRetentionPolicyContainer
[pass]
++++
<pre>
++++
interface TransformRetentionPolicyContainer {
pass:[/**] @property time Specifies that the transform uses a time field to set the retention policy. */
time?: <<TransformRetentionPolicy>>
}
[pass]
++++
</pre>
++++
[discrete]
[[TransformSettings]]
=== TransformSettings
[pass]
++++
<pre>
++++
interface TransformSettings {
pass:[/**] @property align_checkpoints Specifies whether the transform checkpoint ranges should be optimized for performance. Such optimization can align checkpoint ranges with the date histogram interval when date histogram is specified as a group source in the transform config. As a result, less document updates in the destination index will be performed thus improving overall performance. */
align_checkpoints?: boolean
pass:[/**] @property dates_as_epoch_millis Defines if dates in the ouput should be written as ISO formatted string or as millis since epoch. epoch_millis was the default for transforms created before version 7.11. For compatible output set this value to `true`. */
dates_as_epoch_millis?: boolean
pass:[/**] @property deduce_mappings Specifies whether the transform should deduce the destination index mappings from the transform configuration. */
deduce_mappings?: boolean
pass:[/**] @property docs_per_second Specifies a limit on the number of input documents per second. This setting throttles the transform by adding a wait time between search requests. The default value is null, which disables throttling. */
docs_per_second?: <<float>>
pass:[/**] @property max_page_search_size Defines the initial page size to use for the composite aggregation for each checkpoint. If circuit breaker exceptions occur, the page size is dynamically adjusted to a lower value. The minimum value is `10` and the maximum is `65,536`. */
max_page_search_size?: <<integer>>
pass:[/**] @property unattended If `true`, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case of an error which means the transform never fails. Setting the number of retries other than infinite fails in validation. */
unattended?: boolean
}
[pass]
++++
</pre>
++++
[discrete]
[[TransformSource]]
=== TransformSource
[pass]
++++
<pre>
++++
interface TransformSource {
pass:[/**] @property index The source indices for the transform. It can be a single index, an index pattern (for example, `"my-index-*""`), an array of indices (for example, `["my-index-000001", "my-index-000002"]`), or an array of index patterns (for example, `["my-index-*", "my-other-index-*"]`. For remote indices use the syntax `"remote_name:index_name"`. If any indices are in remote clusters then the master node and at least one transform node must have the `remote_cluster_client` node role. */
index: <<Indices>>
pass:[/**] @property query A query clause that retrieves a subset of data from the source index. */
query?: <<QueryDslQueryContainer>>
pass:[/**] @property runtime_mappings Definitions of search-time runtime fields that can be used by the transform. For search runtime fields all data nodes, including remote nodes, must be 7.12 or later. */
runtime_mappings?: <<MappingRuntimeFields>>
}
[pass]
++++
</pre>
++++
[discrete]
[[TransformSyncContainer]]
=== TransformSyncContainer
[pass]
++++
<pre>
++++
interface TransformSyncContainer {
pass:[/**] @property time Specifies that the transform uses a time field to synchronize the source and destination indices. */
time?: <<TransformTimeSync>>
}
[pass]
++++
</pre>
++++
[discrete]
[[TransformTimeSync]]
=== TransformTimeSync
[pass]
++++
<pre>
++++
interface TransformTimeSync {
pass:[/**] @property delay The time delay between the current time and the latest input data time. */
delay?: <<Duration>>
pass:[/**] @property field The date field that is used to identify new documents in the source. In general, its a good idea to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. */
field: <<Field>>
}
[pass]
++++
</pre>
++++