@@ -28,19 +28,19 @@ Explore Change Streams
28
28
29
29
.. code-block:: bash
30
30
:copyable: true
31
- :caption: This command starts an interactive shell called shell1
31
+ :caption: This command starts an interactive shell called ChangeStreamShell1
32
32
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
34
34
35
35
.. code-block:: bash
36
36
:copyable: true
37
- :caption: This command starts an interactive shell called shell2
37
+ :caption: This command starts an interactive shell called ChangeStreamShell2
38
38
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
40
40
41
41
.. step:: Open a Change Stream
42
42
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
44
44
the PyMongo driver.
45
45
46
46
.. code-block:: bash
@@ -80,7 +80,7 @@ Explore Change Streams
80
80
81
81
.. step:: Trigger a Change Event
82
82
83
- In **shell2 **, connect to MongoDB using ``mongosh``, the MongoDB
83
+ In **ChangeStreamShell2 **, connect to MongoDB using ``mongosh``, the MongoDB
84
84
shell, using the following command:
85
85
86
86
.. code-block:: bash
@@ -104,7 +104,7 @@ Explore Change Streams
104
104
use Tutorial1
105
105
db.orders.insertOne( { 'test' : 1 } )
106
106
107
- After entering the preceding commands, switch to **shell1 ** to view
107
+ After entering the preceding commands, switch to **ChangeStreamShell1 ** to view
108
108
the change stream output, which should resemble the following:
109
109
110
110
.. code-block:: json
@@ -149,7 +149,7 @@ Explore Change Streams
149
149
You can apply a filter to a change stream by passing it an aggregation
150
150
pipeline.
151
151
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
153
153
stream using the PyMongo driver.
154
154
155
155
.. code-block:: bash
@@ -189,7 +189,7 @@ Explore Change Streams
189
189
190
190
.. step:: Observe the Filtered Change Stream
191
191
192
- Return to your **shell2 ** session which should be connected to
192
+ Return to your **ChangeStreamShell2 ** session which should be connected to
193
193
MongoDB using ``mongosh``.
194
194
195
195
At the prompt, type the following commands:
@@ -207,7 +207,7 @@ Explore Change Streams
207
207
208
208
[ { "$match": { "$and": [ { "fullDocument.type":"temp" }, { "fullDocument.value":{ "$gte":100 } } ] } } ]
209
209
210
- Try inserting the following documents in in **shell2 ** to verify the
210
+ Try inserting the following documents in in **ChangeStreamShell2 ** to verify the
211
211
change stream only produces events when the documents match the filter:
212
212
213
213
.. code-block:: javascript
0 commit comments