Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ Not all apps support {{cps}}. The following table shows which apps support the {
| **{{ml-app}} {{data-viz}}** | Editable | ES\|QL |
| **{{rules-ui}} and alerts** | Read-only | ES\|QL rules support `SET project_routing`. For non-{{esql}} rules that use index patterns, you can use [qualified index expressions](/explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions) to scope the rule to specific projects.|
| **Streams** | Not available | ES\|QL |
| **Transforms** | Editable | [`project_routing`](/explore-analyze/transforms/transform-overview.md#transform-cps-scope) defined on each transform. |
| **Vega** | Editable | Project routing in Vega specs |

The header's {{cps-init}} scope selector is not available in other apps, including Transforms, Canvas, and object listing pages.
The header's {{cps-init}} scope selector is not available in other apps, including Canvas and object listing pages.

[^cps-badge]: When a visualization panel uses a query-level override, it displays a **Custom CPS scope** badge on dashboards to indicate that it uses a different scope than the {{cps-init}} scope selector.

Expand Down
8 changes: 8 additions & 0 deletions explore-analyze/transforms/ecommerce-transforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ products:
:screenshot:
:::

::::{tip}
On {{serverless-full}}, when your project has [linked projects](/explore-analyze/cross-project-search.md), use the **Project scope** control next to the data view picker to choose which of them the transform searches. Refer to [Cross-project search scope](transform-overview.md#transform-cps-scope).
::::

Group the data by customer ID and add one or more aggregations to learn more about each customer’s orders. For example, let’s calculate the sum of products they purchased, the total price of their purchases, the maximum number of products that they purchased in a single order, and their total number of orders. We’ll accomplish this by using the [`sum` aggregation](elasticsearch://reference/aggregations/search-aggregations-metrics-sum-aggregation.md) on the `total_quantity` and `taxless_total_price` fields, the [`max` aggregation](elasticsearch://reference/aggregations/search-aggregations-metrics-max-aggregation.md) on the `total_quantity` field, and the [`cardinality` aggregation](elasticsearch://reference/aggregations/search-aggregations-metrics-cardinality-aggregation.md) on the `order_id` field:

:::{image} /explore-analyze/images/elasticsearch-reference-ecommerce-pivot2.png
Expand Down Expand Up @@ -301,6 +305,10 @@ products:
:screenshot:
:::

::::{tip}
On {{serverless-full}}, when your project has [linked projects](/explore-analyze/cross-project-search.md), the **Project scope** column on this page shows which projects each transform searches. Refer to [Cross-project search scope](transform-overview.md#transform-cps-scope).
::::

Alternatively, you can use the [start transforms]({{es-apis}}operation/operation-transform-start-transform), [stop transforms]({{es-apis}}operation/operation-transform-stop-transform) and [reset transforms]({{es-apis}}operation/operation-transform-reset-transform) APIs.

If you reset a transform, all checkpoints, states, and the destination index (if it was created by the transform) are deleted. The transform is ready to start again as if it were newly created.
Expand Down
32 changes: 32 additions & 0 deletions explore-analyze/transforms/transform-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,35 @@ If you prefer to spread out the impact on your cluster (at the cost of a slower
```
documents_processed / search_time_in_ms * 1000
```

## Cross-project search scope [transform-cps-scope]
```{applies_to}
stack: unavailable
serverless: preview
```

On {{serverless-full}}, a transform can read source data from projects that are linked to yours through [{{cps}} ({{cps-init}})](/explore-analyze/cross-project-search.md).

A transform's scope is stored as a `project_routing` value in its `source` configuration and applies every time the transform runs. For routing expression syntax, refer to [Project routing in {{cps-init}}](/explore-analyze/cross-project-search/cross-project-search-project-routing.md).

### Set a transform's scope [transform-cps-set]

When you create a transform in {{kib}}, use the **Project scope** control next to the data view picker to choose which linked projects the transform searches. This control opens the [{{cps-init}} scope selector](/explore-analyze/cross-project-search/cross-project-search-manage-scope.md#cps-in-kibana).

The default scope depends on how you create the transform:

* **In {{kib}}**: Uses your space's default scope.
* **With Clone**: Keeps the original transform's scope.
* **Through the API, or before {{cps-init}} was available**: Searches only the origin project until you set `project_routing`.

To change the scope later, edit the transform in {{kib}} or use the [update transform API]({{es-apis}}operation/operation-transform-update-transform).

### Check a transform's scope [transform-cps-column]

The **Transforms** management page shows each transform's scope in the **Project scope** column:

* **This project**: Searches the origin project only.
* **All**: Searches every linked project.
* A count such as **5/10**: Searches a custom subset of projects.

Select the value to see the list of included projects.
Loading