Files
elasticsearch-js/docs/doc_examples/58ca855be30049f8f0879e532db51ee2.asciidoc
2024-07-29 17:10:05 -05:00

56 lines
1.1 KiB
Plaintext

// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.transform.putTransform({
transform_id: "ecommerce_transform1",
source: {
index: "kibana_sample_data_ecommerce",
query: {
term: {
"geoip.continent_name": {
value: "Asia",
},
},
},
},
pivot: {
group_by: {
customer_id: {
terms: {
field: "customer_id",
missing_bucket: true,
},
},
},
aggregations: {
max_price: {
max: {
field: "taxful_total_price",
},
},
},
},
description: "Maximum priced ecommerce data by customer_id in Asia",
dest: {
index: "kibana_sample_data_ecommerce_transform1",
pipeline: "add_timestamp_pipeline",
},
frequency: "5m",
sync: {
time: {
field: "order_date",
delay: "60s",
},
},
retention_policy: {
time: {
field: "order_date",
max_age: "30d",
},
},
});
console.log(response);
----