// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.mjs` to generate the docs examples

[source, js]
----
const response = await client.transform.previewTransform({
  source: {
    index: "kibana_sample_data_ecommerce",
    query: {
      bool: {
        filter: {
          term: {
            currency: "EUR",
          },
        },
      },
    },
  },
  latest: {
    unique_key: ["geoip.country_iso_code", "geoip.region_name"],
    sort: "order_date",
  },
});
console.log(response);
----
