forked from cockroachdb/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cockroachdb#7429 from cockroachdb/misc-cdc-edits
Misc. CDC edits
- Loading branch information
Showing
17 changed files
with
80 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,6 @@ In this example, you'll set up a core changefeed for a single-node cluster that | |
$ cockroach sql --url="postgresql://[email protected]:26257?sslmode=disable" --format=csv | ||
~~~ | ||
|
||
{% include {{ page.version.version }}/cdc/core-url.md %} | ||
|
||
{% include {{ page.version.version }}/cdc/core-csv.md %} | ||
|
||
5. Enable the `kv.rangefeed.enabled` [cluster setting](cluster-settings.html): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,6 @@ In this example, you'll set up a core changefeed for a single-node cluster that | |
$ cockroach sql --url="postgresql://[email protected]:26257?sslmode=disable" --format=csv | ||
~~~ | ||
|
||
{% include {{ page.version.version }}/cdc/core-url.md %} | ||
|
||
{% include {{ page.version.version }}/cdc/core-csv.md %} | ||
|
||
5. Enable the `kv.rangefeed.enabled` [cluster setting](cluster-settings.html): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,11 +25,11 @@ In this example, you'll set up a core changefeed for a single-node cluster that | |
|
||
{% include copy-clipboard.html %} | ||
~~~ shell | ||
$ cockroach sql --url="postgresql://[email protected]:26257?sslmode=disable" --format=csv | ||
$ cockroach sql \ | ||
--format=csv \ | ||
--insecure | ||
~~~ | ||
|
||
{% include {{ page.version.version }}/cdc/core-url.md %} | ||
|
||
{% include {{ page.version.version }}/cdc/core-csv.md %} | ||
|
||
5. Enable the `kv.rangefeed.enabled` [cluster setting](cluster-settings.html): | ||
|
@@ -57,14 +57,18 @@ In this example, you'll set up a core changefeed for a single-node cluster that | |
|
||
{% include copy-clipboard.html %} | ||
~~~ sql | ||
> EXPERIMENTAL CHANGEFEED FOR bar WITH format = experimental_avro, confluent_schema_registry = 'http://localhost:8081'; | ||
> EXPERIMENTAL CHANGEFEED FOR bar \ | ||
WITH format = experimental_avro, confluent_schema_registry = 'http://localhost:8081', resolved = '10s'; | ||
~~~ | ||
|
||
~~~ | ||
table,key,value | ||
bar,\000\000\000\000\001\002\000,\000\000\000\000\002\002\002\000 | ||
NULL,NULL,\000\000\000\000\003\002<1590612821682559000.0000000000 | ||
~~~ | ||
|
||
This changefeed will emit [`resolved` timestamps](changefeed-for.html#options) every 10 seconds. Depending on how quickly you insert into your watched table, the output could look different than what is shown here. | ||
|
||
9. In a new terminal, add another row: | ||
|
||
{% include copy-clipboard.html %} | ||
|
@@ -76,6 +80,7 @@ In this example, you'll set up a core changefeed for a single-node cluster that | |
|
||
~~~ | ||
bar,\000\000\000\000\001\002\002,\000\000\000\000\002\002\002\002 | ||
NULL,NULL,\000\000\000\000\003\002<1590612831891317000.0000000000 | ||
~~~ | ||
|
||
Note that records may take a couple of seconds to display in the core changefeed. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
In this example, you'll set up a core changefeed for a single-node cluster. | ||
|
||
1. In a terminal window, start `cockroach`: | ||
1. Use the [`cockroach start-single-node`](cockroach-start-single-node.html) command to start a single-node cluster: | ||
|
||
{% include copy-clipboard.html %} | ||
~~~ shell | ||
$ cockroach start \ | ||
$ cockroach start-single-node \ | ||
--insecure \ | ||
--listen-addr=localhost \ | ||
--background | ||
|
@@ -15,12 +15,10 @@ In this example, you'll set up a core changefeed for a single-node cluster. | |
{% include copy-clipboard.html %} | ||
~~~ shell | ||
$ cockroach sql \ | ||
--url="postgresql://[email protected]:26257?sslmode=disable" \ | ||
--format=csv | ||
--format=csv \ | ||
--insecure | ||
~~~ | ||
|
||
{% include {{ page.version.version }}/cdc/core-url.md %} | ||
|
||
{% include {{ page.version.version }}/cdc/core-csv.md %} | ||
|
||
3. Enable the `kv.rangefeed.enabled` [cluster setting](cluster-settings.html): | ||
|
@@ -48,13 +46,17 @@ In this example, you'll set up a core changefeed for a single-node cluster. | |
|
||
{% include copy-clipboard.html %} | ||
~~~ sql | ||
> EXPERIMENTAL CHANGEFEED FOR foo; | ||
> EXPERIMENTAL CHANGEFEED FOR foo | ||
WITH resolved = '10s'; | ||
~~~ | ||
~~~ | ||
table,key,value | ||
foo,[0],"{""after"": {""a"": 0}}" | ||
NULL,NULL,"{""resolved"":""1590611959605806000.0000000000""}" | ||
~~~ | ||
|
||
This changefeed will emit [`resolved` timestamps](changefeed-for.html#options) every 10 seconds. Depending on how quickly you insert into your watched table, the output could look different than what is shown here. | ||
|
||
7. In a new terminal, add another row: | ||
|
||
{% include copy-clipboard.html %} | ||
|
@@ -65,7 +67,11 @@ In this example, you'll set up a core changefeed for a single-node cluster. | |
8. Back in the terminal where the core changefeed is streaming, the following output has appeared: | ||
|
||
~~~ | ||
table,key,value | ||
foo,[0],"{""after"": {""a"": 0}}" | ||
NULL,NULL,"{""resolved"":""1590611959605806000.0000000000""}" | ||
foo,[1],"{""after"": {""a"": 1}}" | ||
NULL,NULL,"{""resolved"":""1590611970141415000.0000000000""}" | ||
~~~ | ||
|
||
Note that records may take a couple of seconds to display in the core changefeed. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.