Skip to content

Remove "Enterprise" from v25.2 cdc docs and deprecate experimental changefeed syntax #19680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 4, 2025
Merged
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
4 changes: 4 additions & 0 deletions src/current/_data/redirects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@
sources: ['grant-roles.md']
versions: ['v21.1']

- destination: how-does-a-changefeed-work.md
sources: ['how-does-an-enterprise-changefeed-work.md']
versions: ['v25.2']

- destination: kubernetes-overview.md
sources: ['operate-cockroachdb-kubernetes.md']
versions: ['v21.2']
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Use the `schema_locked` [storage parameter]({% link {{ page.version.version }}/with-storage-parameter.md %}) to disallow [schema changes]({% link {{ page.version.version }}/online-schema-changes.md %}) on a watched table, which allows the changefeed to take a fast path that avoids checking if there are schema changes that could require synchronization between [changefeed aggregators]({% link {{ page.version.version }}/how-does-an-enterprise-changefeed-work.md %}). This helps to decrease the latency between a write committing to a table and it emitting to the [changefeed's sink]({% link {{ page.version.version }}/changefeed-sinks.md %}). Enabling `schema_locked`
Use the `schema_locked` [storage parameter]({% link {{ page.version.version }}/with-storage-parameter.md %}) to disallow [schema changes]({% link {{ page.version.version }}/online-schema-changes.md %}) on a watched table, which allows the changefeed to take a fast path that avoids checking if there are schema changes that could require synchronization between [changefeed aggregators]({% link {{ page.version.version }}/how-does-a-changefeed-work.md %}). This helps to decrease the latency between a write committing to a table and it emitting to the [changefeed's sink]({% link {{ page.version.version }}/changefeed-sinks.md %}). Enabling `schema_locked`

Enable `schema_locked` on the watched table with the [`ALTER TABLE`]({% link {{ page.version.version }}/alter-table.md %}) statement:

Expand Down
3 changes: 0 additions & 3 deletions src/current/_includes/v25.2/cdc/core-csv.md

This file was deleted.

3 changes: 0 additions & 3 deletions src/current/_includes/v25.2/cdc/core-url.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
In this example, you'll set up a basic changefeed for a single-node cluster that emits Avro records. CockroachDB's Avro binary encoding convention uses the [Confluent Schema Registry](https://docs.confluent.io/current/schema-registry/docs/serializer-formatter.html) to store Avro schemas.
In this example, you'll set up a sinkless changefeed for a single-node cluster that emits Avro records. CockroachDB's Avro binary encoding convention uses the [Confluent Schema Registry](https://docs.confluent.io/current/schema-registry/docs/serializer-formatter.html) to store Avro schemas.

1. Use the [`cockroach start-single-node`]({% link {{ page.version.version }}/cockroach-start-single-node.md %}) command to start a single-node cluster:

Expand Down Expand Up @@ -28,36 +28,36 @@ In this example, you'll set up a basic changefeed for a single-node cluster that
$ cockroach sql --url="postgresql://root@127.0.0.1:26257?sslmode=disable" --format=csv
~~~

{% include {{ page.version.version }}/cdc/core-url.md %}
{% include {{ page.version.version }}/cdc/sinkless-url.md %}

{% include {{ page.version.version }}/cdc/core-csv.md %}
{% include {{ page.version.version }}/cdc/sinkless-csv.md %}

1. Enable the `kv.rangefeed.enabled` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}):

{% include_cached copy-clipboard.html %}
~~~ sql
> SET CLUSTER SETTING kv.rangefeed.enabled = true;
SET CLUSTER SETTING kv.rangefeed.enabled = true;
~~~

1. Create table `bar`:

{% include_cached copy-clipboard.html %}
~~~ sql
> CREATE TABLE bar (a INT PRIMARY KEY);
CREATE TABLE bar (a INT PRIMARY KEY);
~~~

1. Insert a row into the table:

{% include_cached copy-clipboard.html %}
~~~ sql
> INSERT INTO bar VALUES (0);
INSERT INTO bar VALUES (0);
~~~

1. Start the basic changefeed:

{% include_cached copy-clipboard.html %}
~~~ sql
> EXPERIMENTAL CHANGEFEED FOR bar WITH format = avro, confluent_schema_registry = 'http://localhost:8081';
CREATE CHANGEFEED FOR TABLE bar WITH format = avro, confluent_schema_registry = 'http://localhost:8081';
~~~

~~~
Expand All @@ -69,16 +69,16 @@ In this example, you'll set up a basic changefeed for a single-node cluster that

{% include_cached copy-clipboard.html %}
~~~ shell
$ cockroach sql --insecure -e "INSERT INTO bar VALUES (1)"
cockroach sql --insecure -e "INSERT INTO bar VALUES (1)"
~~~

1. Back in the terminal where the basic changefeed is streaming, the output will appear:
1. Back in the terminal where the changefeed is streaming, the output will appear:

~~~
bar,\000\000\000\000\001\002\002,\000\000\000\000\002\002\002\002
~~~

Note that records may take a couple of seconds to display in the basic changefeed.
Note that records may take a couple of seconds to display in the changefeed.

1. To stop streaming the changefeed, enter **CTRL+C** into the terminal where the changefeed is running.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
In this example, you'll set up a basic changefeed for a single-node cluster.
In this example, you'll set up a sinkless changefeed for a single-node cluster.

1. In a terminal window, start `cockroach`:

Expand All @@ -14,41 +14,41 @@ In this example, you'll set up a basic changefeed for a single-node cluster.

{% include_cached copy-clipboard.html %}
~~~ shell
$ cockroach sql \
cockroach sql \
--url="postgresql://root@127.0.0.1:26257?sslmode=disable" \
--format=csv
~~~

{% include {{ page.version.version }}/cdc/core-url.md %}
{% include {{ page.version.version }}/cdc/sinkless-url.md %}

{% include {{ page.version.version }}/cdc/core-csv.md %}
{% include {{ page.version.version }}/cdc/sinkless-csv.md %}

1. Enable the `kv.rangefeed.enabled` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}):

{% include_cached copy-clipboard.html %}
~~~ sql
> SET CLUSTER SETTING kv.rangefeed.enabled = true;
SET CLUSTER SETTING kv.rangefeed.enabled = true;
~~~

1. Create table `foo`:

{% include_cached copy-clipboard.html %}
~~~ sql
> CREATE TABLE foo (a INT PRIMARY KEY);
CREATE TABLE foo (a INT PRIMARY KEY);
~~~

1. Insert a row into the table:

{% include_cached copy-clipboard.html %}
~~~ sql
> INSERT INTO foo VALUES (0);
INSERT INTO foo VALUES (0);
~~~

1. Start the basic changefeed:
1. Start the sinkless changefeed:

{% include_cached copy-clipboard.html %}
~~~ sql
> EXPERIMENTAL CHANGEFEED FOR foo;
CREATE CHANGEFEED FOR TABLE foo;
~~~
~~~
table,key,value
Expand All @@ -62,13 +62,13 @@ In this example, you'll set up a basic changefeed for a single-node cluster.
$ cockroach sql --insecure -e "INSERT INTO foo VALUES (1)"
~~~

1. Back in the terminal where the basic changefeed is streaming, the following output has appeared:
1. Back in the terminal where the changefeed is streaming, the following output has appeared:

~~~
foo,[1],"{""after"": {""a"": 1}}"
~~~

Note that records may take a couple of seconds to display in the basic changefeed.
Note that records may take a couple of seconds to display in the changefeed.

1. To stop streaming the changefeed, enter **CTRL+C** into the terminal where the changefeed is running.

Expand Down
2 changes: 0 additions & 2 deletions src/current/_includes/v25.2/cdc/examples-license-workload.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
1. If you do not already have one, [request a trial {{ site.data.products.enterprise }} license]({% link {{ page.version.version }}/licensing-faqs.md %}#obtain-a-license).

1. Use the [`cockroach start-single-node`]({% link {{ page.version.version }}/cockroach-start-single-node.md %}) command to start a single-node cluster:

{% include_cached copy-clipboard.html %}
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/v25.2/cdc/lagging-ranges.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Use the `changefeed.lagging_ranges` metric to track the number of [ranges]({% li
- `lagging_ranges_polling_interval` sets the interval rate for when lagging ranges are checked and the `lagging_ranges` metric is updated. Polling adds latency to the `lagging_ranges` metric being updated. For example, if a range falls behind by 3 minutes, the metric may not update until an additional minute afterward.
- **Default:** `1m`

Use the `changefeed.total_ranges` metric to monitor the number of ranges that are watched by [aggregator processors]({% link {{ page.version.version }}/how-does-an-enterprise-changefeed-work.md %}) participating in the changefeed job. If you're experiencing lagging ranges, `changefeed.total_ranges` may indicate that the number of ranges watched by aggregator processors in the job is unbalanced. You may want to try [pausing]({% link {{ page.version.version }}/pause-job.md %}) the changefeed and then [resuming]({% link {{ page.version.version }}/resume-job.md %}) it, so that the changefeed replans the work in the cluster. `changefeed.total_ranges` shares the same polling interval as the `changefeed.lagging_ranges` metric, which is controlled by the `lagging_ranges_polling_interval` option.
Use the `changefeed.total_ranges` metric to monitor the number of ranges that are watched by [aggregator processors]({% link {{ page.version.version }}/how-does-a-changefeed-work.md %}) participating in the changefeed job. If you're experiencing lagging ranges, `changefeed.total_ranges` may indicate that the number of ranges watched by aggregator processors in the job is unbalanced. You may want to try [pausing]({% link {{ page.version.version }}/pause-job.md %}) the changefeed and then [resuming]({% link {{ page.version.version }}/resume-job.md %}) it, so that the changefeed replans the work in the cluster. `changefeed.total_ranges` shares the same polling interval as the `changefeed.lagging_ranges` metric, which is controlled by the `lagging_ranges_polling_interval` option.

{{site.data.alerts.callout_success}}
You can use the [`metrics_label`]({% link {{ page.version.version }}/monitor-and-debug-changefeeds.md %}#using-changefeed-metrics-labels) option to track the `lagging_ranges` and `total_ranges` metric per changefeed.
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/v25.2/cdc/modify-changefeed.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
To modify an {{ site.data.products.enterprise }} changefeed, [pause]({% link {{ page.version.version }}/create-and-configure-changefeeds.md %}#pause) the job and then use:
To modify a changefeed, [pause]({% link {{ page.version.version }}/create-and-configure-changefeeds.md %}#pause) the job and then use:

~~~ sql
ALTER CHANGEFEED job_id {ADD table DROP table SET option UNSET option};
Expand Down
4 changes: 0 additions & 4 deletions src/current/_includes/v25.2/cdc/msk-tutorial-crdb-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
cockroach sql --insecure
~~~

{{site.data.alerts.callout_info}}
To set your {{ site.data.products.enterprise }} license, refer to the [Licensing FAQs]({% link {{ page.version.version }}/licensing-faqs.md %}#set-a-license) page.
{{site.data.alerts.end}}

1. Enable the `kv.rangefeed.enabled` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}):

{% include_cached copy-clipboard.html %}
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/v25.2/cdc/show-changefeed-job.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SHOW CHANGEFEED JOBS;
(2 rows)
~~~

To show an individual {{ site.data.products.enterprise }} changefeed:
To show an individual changefeed:

{% include_cached copy-clipboard.html %}
~~~ sql
Expand Down
3 changes: 3 additions & 0 deletions src/current/_includes/v25.2/cdc/sinkless-csv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{site.data.alerts.callout_info}}
To determine how wide the columns need to be, the default `table` display format in `cockroach sql` buffers the results it receives from the server before printing them to the console. When consuming sinkless changefeed data using `cockroach sql`, it's important to use a display format like `csv` that does not buffer its results. To set the display format, use the [`--format=csv` flag]({% link {{ page.version.version }}/cockroach-sql.md %}#sql-flag-format) when starting the [built-in SQL client]({% link {{ page.version.version }}/cockroach-sql.md %}), or set the [`\set display_format=csv` option]({% link {{ page.version.version }}/cockroach-sql.md %}#client-side-options) once the SQL client is open.
{{site.data.alerts.end}}
3 changes: 3 additions & 0 deletions src/current/_includes/v25.2/cdc/sinkless-url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{site.data.alerts.callout_info}}
Sinkless changefeeds return results differently than other SQL statements, which means that they require a dedicated database connection with specific settings around result buffering. In normal operation, CockroachDB improves performance by buffering results server-side before returning them to a client; however, result buffering is automatically turned off for sinkless changefeeds. Also, sinkless changefeeds have different cancellation behavior than other queries: they can only be canceled by closing the underlying connection or issuing a [`CANCEL QUERY`]({% link {{ page.version.version }}/cancel-query.md %}) statement on a separate connection. Combined, these attributes of changefeeds mean that applications should explicitly create dedicated connections to consume changefeed data, instead of using a connection pool as most client drivers do by default.
{{site.data.alerts.end}}
16 changes: 2 additions & 14 deletions src/current/_includes/v25.2/cdc/sql-cluster-settings-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,14 @@

{% include_cached copy-clipboard.html %}
~~~ shell
$ cockroach sql --insecure
~~~

1. Set your organization name and [{{ site.data.products.enterprise }} license]({% link {{ page.version.version }}/licensing-faqs.md %}#types-of-licenses) key:

{% include_cached copy-clipboard.html %}
~~~ sql
> SET CLUSTER SETTING cluster.organization = '<organization name>';
~~~

{% include_cached copy-clipboard.html %}
~~~ sql
> SET CLUSTER SETTING enterprise.license = '<secret>';
cockroach sql --insecure
~~~

1. Enable the `kv.rangefeed.enabled` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}):

{% include_cached copy-clipboard.html %}
~~~ sql
> SET CLUSTER SETTING kv.rangefeed.enabled = true;
SET CLUSTER SETTING kv.rangefeed.enabled = true;
~~~

{% include {{ page.version.version }}/cdc/cdc-cloud-rangefeed.md %}
4 changes: 2 additions & 2 deletions src/current/_includes/v25.2/sidebar-data/stream-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@
"title": "Technical Overview",
"items": [
{
"title": "How Does an Enterprise Changefeed Work?",
"title": "How Does a Changefeed Work?",
"urls": [
"/${VERSION}/how-does-an-enterprise-changefeed-work.html"
"/${VERSION}/how-does-a-changefeed-work.html"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/current/cockroachcloud/costs.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ This is the usage for any data leaving CockroachDB such as SQL data being sent t

### Change data capture (changefeeds)

For change data capture (CDC), all CockroachDB {{ site.data.products.cloud }} clusters can use [Enterprise changefeeds]({% link {{ site.current_cloud_version}}/how-does-an-enterprise-changefeed-work.md %}).
For change data capture (CDC), all CockroachDB {{ site.data.products.cloud }} clusters can use [Enterprise changefeeds]({% link {{ site.current_cloud_version}}/how-does-a-changefeed-work.md %}).

<section class="filter-content" markdown="1" data-scope="basic">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docs_area: stream_data

While CockroachDB is an excellent system of record, it also needs to coexist with other systems. For example, you might want to keep your data mirrored in full-text indexes, analytics engines, or big data pipelines.

This page demonstrates how to use an [{{ site.data.products.enterprise }} changefeed](../{{site.current_cloud_version}}/create-changefeed.html) to stream row-level changes to [Snowflake](https://www.snowflake.com/), an online analytical processing (OLAP) database.
This page demonstrates how to use a [changefeed](../{{site.current_cloud_version}}/create-changefeed.html) to stream row-level changes to [Snowflake](https://www.snowflake.com/), an online analytical processing (OLAP) database.

{{site.data.alerts.callout_info}}
Snowflake is optimized for inserts and batch rewrites over streaming updates. This tutorial sets up a changefeed to stream data to S3 with Snowpipe sending changes to Snowflake. Snowpipe imports previously unseen files and does not address uniqueness for primary keys, which means that target tables in Snowflake can contain multiple records per primary key.
Expand Down Expand Up @@ -91,11 +91,11 @@ Every change to a watched row is emitted as a record in a configurable format (i

1. Create an S3 bucket where streaming updates from the watched tables will be collected.

You will need the name of the S3 bucket when you [create your changefeed](#step-7-create-an-enterprise-changefeed). Ensure you have a set of IAM credentials with write access on the S3 bucket that you will use during [changefeed setup](#step-7-create-an-enterprise-changefeed).
You will need the name of the S3 bucket when you [create your changefeed](#step-7-create-a-changefeed). Ensure you have a set of IAM credentials with write access on the S3 bucket that you will use during [changefeed setup](#step-7-create-a-changefeed).

## Step 7. Create an enterprise changefeed
## Step 7. Create a changefeed

Back in the built-in SQL shell, [create an enterprise changefeed](../{{site.current_cloud_version}}/create-changefeed.html). Replace the placeholders with your AWS access key ID and AWS secret access key:
Back in the built-in SQL shell, [create a changefeed](../{{site.current_cloud_version}}/create-changefeed.html). Replace the placeholders with your AWS access key ID and AWS secret access key:

{% include_cached copy-clipboard.html %}
~~~ sql
Expand Down
Binary file added src/current/images/changefeed-structure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/current/images/v25.2/changefeed-structure.png
Binary file not shown.
Loading
Loading