You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type `exit` and press kbd:[Return] to exit the Pulsar shell.
640
640
641
-
[NOTE]
642
-
====
643
641
The first time you use the `astra streaming pulsar-shell` commands, the {product} downloads and installs the `pulsar-shell` utility to the {product} installation directory (`~/.astra/lunastreaming-shell-*`).
644
-
====
645
642
646
643
=== `streaming pulsar-shell` options
647
644
@@ -947,144 +944,8 @@ The directory must already exist before you run the command.
947
944
If the directory doesn't exist, the {product} will report the following error: `INVALID_ARGUMENT: Destination folder has not been found`.
948
945
====
949
946
950
-
== Change Data Capture
951
-
952
-
[IMPORTANT]
953
-
====
954
-
CDC for {astra_db} incurs billed charges based on your {astra_stream} usage.
955
-
For more information, see https://www.datastax.com/pricing/astra-streaming[{astra_stream} pricing] and https://www.datastax.com/products/datastax-astra/cdc-for-astra-db[CDC metering rates].
956
-
====
947
+
== Change Data Capture (CDC)
957
948
958
949
CDC for {astra_db} automatically captures changes in real time, de-duplicates the changes, and then streams the clean set of changed data into xref:astra-streaming:ROOT:index.adoc[{astra_stream}] where it can be processed by client applications or sent to downstream systems.
959
950
960
-
The following procedure provides some examples of how to use the {product} to configure and use CDC for {astra_db}:
961
-
962
-
. Create an {astra_db} {db-serverless} database:
963
-
+
964
-
[source,bash]
965
-
----
966
-
astra db create demo_cdc
967
-
----
968
-
+
969
-
.Result
970
-
[%collapsible]
971
-
====
972
-
[source,console]
973
-
----
974
-
975
-
----
976
-
====
977
-
978
-
. Create a tenant in same region as your database:
// TODO: Add examples for `-cf`/`--config-file`, `-conf/`--config`, `--env`, `--token`, and `-v`/`--verbose` options.
1609
1609
1610
+
[#cqlsh]
1610
1611
== Use CQL shell (cqlsh)
1611
1612
1612
1613
The CQL shell (`cqlsh`) is an interface that you can use to issue xref:astra@cql:ROOT:index.adoc[{cass-short} Query Language (CQL)] commands to your {astra_db} database.
@@ -1641,12 +1642,12 @@ Use HELP for help.
1641
1642
1642
1643
Type `exit` and press kbd:[Return] to exit the CQL shell.
1643
1644
1644
-
[NOTE]
1645
-
======
1646
1645
The first time you use `astra db cqlsh`, the {product} downloads and installs the `cqlsh` utility to the {product} installation directory (`~/.astra/cqlsh-astra`).
1647
1646
The {product} also downloads the {scb-long} for each database you connect to and stores the {scb} zip files in the `~/.astra/scb` directory.
1648
1647
1649
-
If you encounter a `ModuleNotFoundError` error, check that you have a supported version of Python available in your terminal:
1648
+
[NOTE]
1649
+
======
1650
+
If the {product} reports `ModuleNotFoundError`, check that you have a supported version of Python available in your terminal:
1650
1651
1651
1652
[source,bash]
1652
1653
----
@@ -2933,4 +2934,150 @@ SYNOPSIS
2933
2934
2934
2935
Where * indicates the default command(s)
2935
2936
See 'astra help role <command>' for more information on a specific command.
2936
-
----
2937
+
----
2938
+
2939
+
[#cdc]
2940
+
== Configure Change Data Capture (CDC)
2941
+
2942
+
[IMPORTANT]
2943
+
====
2944
+
CDC for {astra_db} incurs billed charges based on your {astra_stream} usage.
2945
+
For more information, see https://www.datastax.com/pricing/astra-streaming[{astra_stream} pricing] and https://www.datastax.com/products/datastax-astra/cdc-for-astra-db[CDC metering rates].
2946
+
====
2947
+
2948
+
CDC for {astra_db} automatically captures changes in real time, de-duplicates the changes, and then streams the clean set of changed data into xref:astra-streaming:ROOT:index.adoc[{astra_stream}] where it can be processed by client applications or sent to downstream systems.
2949
+
2950
+
The following procedure describes how to use the {product} to enable CDC on a {db-serverless} database:
2951
+
2952
+
. Create an {astra_db} {db-serverless} database:
2953
+
+
2954
+
[source,bash]
2955
+
----
2956
+
astra db create cdc_demo_db -c aws -r us-east-1 -k cdc_demo_keyspace
2957
+
----
2958
+
+
2959
+
.Result
2960
+
[%collapsible]
2961
+
====
2962
+
[source,console]
2963
+
----
2964
+
REGION OK
2965
+
[INFO] Database 'cdc_demo_db' does not exist. Creating database 'cdc_demo_db' with keyspace 'cdc_demo_keyspace'
2966
+
get CLoud provider
2967
+
[INFO] Database 'cdc_demo_db' and keyspace 'cdc_demo_keyspace' are being created.
2968
+
[INFO] Database 'cdc_demo_db' has status 'PENDING' waiting to be 'ACTIVE' ...
2969
+
[INFO] Database 'cdc_demo_db' has status 'ACTIVE' (took 112117 millis)
2970
+
[OK] Database 'cdc_demo_db' is ready.
2971
+
----
2972
+
====
2973
+
2974
+
. Create an {astra_stream} tenant in the same region as your database:
. Use the xref:ROOT:managing.adoc#cqlsh[CQL shell] to create a table with a primary key column in your database.
2992
+
+
2993
+
[source,bash]
2994
+
----
2995
+
astra db cqlsh cdc_demo_db -e "CREATE TABLE IF NOT EXISTS cdc_demo_keyspace.cdc_demo_table (key text PRIMARY KEY, c1 text);"
2996
+
----
2997
+
+
2998
+
.Result
2999
+
[%collapsible]
3000
+
====
3001
+
[source,console]
3002
+
----
3003
+
[INFO] Cqlsh is starting, please wait for connection establishment...
3004
+
----
3005
+
====
3006
+
3007
+
. Confirm table creation:
3008
+
+
3009
+
[source,bash]
3010
+
----
3011
+
astra db cqlsh cdc_demo_db -e "SELECT * FROM cdc_demo_keyspace.cdc_demo_table"
3012
+
----
3013
+
+
3014
+
.Result
3015
+
[%collapsible]
3016
+
====
3017
+
[source,console]
3018
+
----
3019
+
[INFO] Cqlsh is starting, please wait for connection establishment...
3020
+
3021
+
key | c1
3022
+
-----+----
3023
+
3024
+
(0 rows)
3025
+
----
3026
+
====
3027
+
3028
+
. Create a CDC connector.
3029
+
+
3030
+
[source,bash]
3031
+
----
3032
+
astra db create-cdc cdc_demo_db -k cdc_demo_keyspace --table cdc_demo_table --tenant cdc-demo-tenant
3033
+
----
3034
+
+
3035
+
.Result
3036
+
[%collapsible]
3037
+
====
3038
+
[source,console]
3039
+
----
3040
+
3041
+
----
3042
+
====
3043
+
// TODO: The command is not worrking as expected. Must investigate and figure out why it is reporting the following error: [ERROR] INVALID_ARGUMENT: Error Code=422(422) Invalid information provided to create DB: 422 Unprocessable Entity: databaseId, keyspace, tableName, and orgId are mandatory fields
3044
+
3045
+
. Confirm CDC details for the database and tenant.
After you enable CDC on your {db-serverless} database, you can xref:astra-db-serverless:databases:change-data-capture.adoc#connect-a-sink[connect a sink].
0 commit comments