To initiate an incremental snapshot, you can send an {link-prefix}:{link-signalling}#debezium-signaling-ad-hoc-incremental-snapshots[ad hoc snapshot signal] to the signaling {data-collection} on the source database.

You submit a signal to the signaling {data-collection} by using the MongoDB `insert()` method.

After {prodname} detects the change in the signaling {data-collection}, it reads the signal, and runs the requested snapshot operation.

The query that you submit specifies the {data-collection}s to include in the snapshot, and, optionally, specifies the type of snapshot operation.
Currently, the only valid options for snapshots operations are `incremental` and `blocking`.

To specify the {data-collection}s to include in the snapshot, provide a `data-collections` array that lists the {data-collection}s or an array of regular expressions used to match {data-collection}s, for example, +
`{"data-collections": ["public.Collection1", "public.Collection2"]}` +

The `data-collections` array for an incremental snapshot signal has no default value.
If the `data-collections` array is empty, {prodname} detects that no action is required and does not perform a snapshot.

[NOTE]
====
If the name of a {data-collection} that you want to include in a snapshot contains a dot (`.`) in the name of the database or table, to add the {data-collection} to the `data-collections` array, you must escape each part of the name in double quotes.
For example, to include a data collection that exists in the `*public*` database, and that has the name `*My.Collection*`, use the following format: `*"public"."My.Collection"*`.
====

.Prerequisites

* {link-prefix}:{link-signalling}#debezium-signaling-enabling-source-signaling-channel[Signaling is enabled]. +
** A signaling data collection exists on the source database.
** The signaling data collection is specified in the xref:{context}-property-signal-data-collection[`signal.data.collection`] property.

.Procedure

. Insert an execute snapshot signal document into the source signaling {data-collection} by using the following syntax:
+
[source,bash,indent=0,subs="+attributes,+quotes"]
----
_<signalDataCollection>_.insert({"_id" : _<idNumber>_,"type" : _<snapshotType>_, "data" : {"data-collections" ["_<collectionName>_", "_<collectionName>_"],"type": _<snapshotType>_, "additional-conditions" : [{"data-collections" : "_<collectionName>_", "filter" : "_<additional-condition>_"}] }});
----
+
For example,
+
[source,bash,indent=0,subs="+attributes,+quotes"]
----
db.debeziumSignal.insert({
"type" : "execute-snapshot",
"data" : {
"data-collections" ["\"public\".\"Collection1\"", "\"public\".\"Collection2\""],
"type": "incremental"}
"additional-conditions":[{"data-collection": "public.Collection1" ,"filter":"color=\'blue\'"}]}');
});
----
+
The values of the `id`,`type`, and `data` parameters in the command correspond to the {link-prefix}:{link-signalling}#debezium-signaling-description-of-required-structure-of-a-signaling-data-collection[fields of the signaling {data-collection}].
+
The following list describes the parameters in the incremental snapshot example:
+
`db.debeziumSignal.insert`::
Insert command that specifies the signaling {data-collection} to which you want to add the snapshot signal document.
The data collection is specified by its fully-qualified name.

`type`::
Specifies the kind of signal to send, in this case, an `execute-snapshot` signal.

`_id`::
An optional parameter that assigns an arbitrary string to be the identifier for the signal request.
In the preceding example, the signal omits the optional `_id` parameter.
Because the signal does not explicitly assign a value to the parameter, MongoDB automatically assigns an arbitrary id to the document.
This `id` becomes the identifier for the signal request.
{prodname} does not use this identifier string; however you can use the `id` to collate log messages with documents in the signaling {data-collection}.


`data.data-collections`::
A required component in the `data` field of an execute snapshot signal that specifies an array of {data-collection} names or regular expressions that represent the {data-collection}s that you want to include in the snapshot, in this case, `public.Collection1` and `public.Collection2`.

`data.type`::
An optional `type` component of the `data` field of a signal that specifies the type of snapshot operation to run.
Valid values are `incremental` or `blocking`.

`additional-conditions`::
An optional array that specifies a set of additional conditions that the connector evaluates to determine the subset of records to include in a snapshot.
You can specify one or more data collections and set a filter parameter for each collection.
Each filter instructs the snapshot to capture only documents that contain a field with a specified value.
In this case, the parameter instructs the signal to capture documents in the `public.Collection1` collection only if they include the field `color` with the value `'blue'`.

The following example, shows the JSON for an incremental snapshot event that is captured by a connector.

.Example: Incremental snapshot event message
====
[source,json,index=0]
----
{
    "before":null,
    "after": {
        "pk":"1",
        "value":"New data"
    },
    "source": {
        ...
        "snapshot":"incremental"
    },
    "op":"r",
    "ts_ms":"1620393591654",
    "ts_us":"1620393591654962",
    "ts_ns":"1620393591654962147",
    "transaction":null
}
----
====

The following list describes select parameters in the preceding event message example:

`snapshot`::
Specifies the type of snapshot operation, in this case an incremental snapshot.

`op`::
Specifies the event type.
The value for snapshot events is `r`, signifying a `READ` operation.
