Skip to content

Commit 811e39e

Browse files
author
Chris Cho
authored
DOCSP-22434 time series tutorial (#9)
* DOCSP-22434: time series tutorial
1 parent 33ff46d commit 811e39e

File tree

6 files changed

+283
-195
lines changed

6 files changed

+283
-195
lines changed

source/tutorials.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,5 @@ read the :ref:`Tutorial Setup <kafka-tutorials-docker-setup>` first:
2323
- :ref:`Getting Started with the MongoDB Kafka Source Connector <kafka-tutorial-source-connector>`
2424
- :ref:`Getting Started with the MongoDB Kafka Sink Connector <kafka-tutorial-sink-connector>`
2525
- :ref:`Replicate Data with a Change Data Capture Handler <kafka-tutorial-replicate-with-cdc>`
26+
- :ref:`Migrate an Existing Collection to a Time Series Collection <kafka-tutorial-migrate-time-series>`
2627

27-
Since the following tutorial contains different development environments,
28-
follow the setup instructions contained within it:
29-
30-
- :doc:`Migrate an Existing Collection to a Time Series Collection </tutorials/migrate-time-series>`

source/tutorials/explore-change-streams.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ Explore Change Streams
2828

2929
.. code-block:: bash
3030
:copyable: true
31-
:caption: This command starts an interactive shell called shell1
31+
:caption: This command starts an interactive shell called ChangeStreamShell1
3232

33-
docker run --rm --name shell1 --network mongodb-kafka-base_localnet -it robwma/mongokafkatutorial:latest bash
33+
docker run --rm --name ChangeStreamShell1 --network mongodb-kafka-base_localnet -it robwma/mongokafkatutorial:latest bash
3434

3535
.. code-block:: bash
3636
:copyable: true
37-
:caption: This command starts an interactive shell called shell2
37+
:caption: This command starts an interactive shell called ChangeStreamShell2
3838

39-
docker run --rm --name shell2 --network mongodb-kafka-base_localnet -it robwma/mongokafkatutorial:latest bash
39+
docker run --rm --name ChangeStreamShell2 --network mongodb-kafka-base_localnet -it robwma/mongokafkatutorial:latest bash
4040

4141
.. step:: Open a Change Stream
4242

43-
In **shell1**, create a Python script to open a change stream using
43+
In **ChangeStreamShell1**, create a Python script to open a change stream using
4444
the PyMongo driver.
4545

4646
.. code-block:: bash
@@ -80,7 +80,7 @@ Explore Change Streams
8080

8181
.. step:: Trigger a Change Event
8282

83-
In **shell2**, connect to MongoDB using ``mongosh``, the MongoDB
83+
In **ChangeStreamShell2**, connect to MongoDB using ``mongosh``, the MongoDB
8484
shell, using the following command:
8585

8686
.. code-block:: bash
@@ -104,7 +104,7 @@ Explore Change Streams
104104
use Tutorial1
105105
db.orders.insertOne( { 'test' : 1 } )
106106

107-
After entering the preceding commands, switch to **shell1** to view
107+
After entering the preceding commands, switch to **ChangeStreamShell1** to view
108108
the change stream output, which should resemble the following:
109109

110110
.. code-block:: json
@@ -149,7 +149,7 @@ Explore Change Streams
149149
You can apply a filter to a change stream by passing it an aggregation
150150
pipeline.
151151

152-
In **shell1**, create a new Python script to open a filtered change
152+
In **ChangeStreamShell1**, create a new Python script to open a filtered change
153153
stream using the PyMongo driver.
154154

155155
.. code-block:: bash
@@ -189,7 +189,7 @@ Explore Change Streams
189189

190190
.. step:: Observe the Filtered Change Stream
191191

192-
Return to your **shell2** session which should be connected to
192+
Return to your **ChangeStreamShell2** session which should be connected to
193193
MongoDB using ``mongosh``.
194194

195195
At the prompt, type the following commands:
@@ -207,7 +207,7 @@ Explore Change Streams
207207

208208
[ { "$match": { "$and": [ { "fullDocument.type":"temp" }, { "fullDocument.value":{ "$gte":100 } } ] } } ]
209209

210-
Try inserting the following documents in in **shell2** to verify the
210+
Try inserting the following documents in in **ChangeStreamShell2** to verify the
211211
change stream only produces events when the documents match the filter:
212212

213213
.. code-block:: javascript

0 commit comments

Comments
 (0)