diff --git a/modules/develop/pages/data-transforms/build.adoc b/modules/develop/pages/data-transforms/build.adoc index 4f65e0dc5..38e6bc38e 100644 --- a/modules/develop/pages/data-transforms/build.adoc +++ b/modules/develop/pages/data-transforms/build.adoc @@ -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= @@ -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 @@ -471,6 +497,7 @@ JavaScript:: + -- The JavaScript SDK does not support writing records to a specific output topic. + -- ======