Skip to content
Merged
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
37 changes: 32 additions & 5 deletions modules/develop/pages/data-transforms/build.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,32 @@ endif::[]
ifdef::env-cloud[]
== Enable data transforms

Data transforms is disabled on all clusters by default. Before you can deploy data transforms to a cluster, you must first enable the feature.
Data transforms are disabled on all clusters by default. Before you can deploy data transforms to a cluster, you must first enable the feature with either the `rpk` command-line tool or the Cloud API.

Use the Cloud API to set xref:ROOT:reference:properties/cluster-properties.adoc#data_transforms_enabled[`data_transforms_enabled`] to `true`.
[tabs]
======
`rpk`::
+
--
Set the `data_transforms_enabled` cluster property to `true`:

[source,bash]
----
rpk cluster config set data_transforms_enabled true
----


NOTE: Some properties require a rolling restart, and it can take several minutes for the update to complete. The `rpk cluster config set` command returns the operation ID.

--
Cloud API::
+
--
Create a cluster by making a xref:api:ROOT:cloud-controlplane-api.adoc#post-/v1/clusters[`POST /v1/clusters`] request. Edit `cluster_configuration` in the request body to set xref:ROOT:reference:properties/cluster-properties.adoc#data_transforms_enabled[`data_transforms_enabled`] to `true`.

[,bash]
Update a cluster by making a xref:api:ROOT:cloud-controlplane-api.adoc#patch-/v1/clusters/-cluster.id-[`PATCH /v1/clusters/{cluster.id}`] request, passing the cluster ID as a parameter. For example:

[source,bash]
----
# Store your cluster ID in a variable
export RP_CLUSTER_ID=<cluster-id>
Expand All @@ -46,11 +67,16 @@ curl -H "Authorization: Bearer ${RP_CLOUD_TOKEN}" -X PATCH \
-d '{"cluster_configuration":{"custom_properties": {"data_transforms_enabled":true}}}'
----

The xref:api:ROOT:cloud-controlplane-api.adoc#patch-/v1/clusters/-cluster.id-[`PATCH /clusters/{cluster.id}`] request returns the ID of a long-running operation. The operation may take up to ten minutes to complete. You can check the status of the operation by polling the xref:api:ROOT:cloud-controlplane-api.adoc#get-/v1/operations/-id-[`GET /operations/\{id}`] endpoint.
The xref:api:ROOT:cloud-controlplane-api.adoc#patch-/v1/clusters/-cluster.id-[`PATCH /clusters/{cluster.id}`] request returns the operation ID. You can check the status of the operation by polling the xref:api:ROOT:cloud-controlplane-api.adoc#get-/v1/operations/-id-[`GET /operations/\{id}`] endpoint.

NOTE: Some properties require a rolling restart for the update to take effect. This triggers a xref:manage:api/cloud-byoc-controlplane-api.adoc#lro[long-running operation] that can take several minutes to complete.

--
======

NOTE: You must restart your cluster if you change this configuration for a running cluster.
endif::[]


[[init]]
== Initialize a data transforms project

Expand Down Expand Up @@ -471,6 +497,7 @@ JavaScript::
+
--
The JavaScript SDK does not support writing records to a specific output topic.

--
======

Expand Down