Data FlowData Flow
DataFlow
  • User Manual
  • Developer Manual
  • Examples
  • API Reference
Overview
Getting Started
Pipeline Authoring
    Pipeline Spec OverviewConnections
    Sources
    Transforms
    Destinations
      DestinationsFile System DestinationsObject Storage DestinationsJDBC DestinationsNoSQL DestinationsStream DestinationsAPI Destinations
    Execution Settings
Execution
Deployment
Troubleshooting
Examples
Destinations

NoSQL Destinations

NoSQL destinations write to ten stores, one collection or table per output.

Providers: mongodb | cassandra | dynamodb | cosmosdb | hbase | elasticsearch | solr | firestore | rethinkdb | couchdb

Output fields

Every output in this type carries these fields; provider and format values live under options.

FieldTypeDefaultNotes
name (required)string--
mode (required)overwrite or append--
from (required)string--
table (required)string--

Minimal example

A complete nosql destination with one output, written for provider mongodb:

Code
destinations: - name: orders type: nosql provider: mongodb # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: mongodb://<host>:27017 database: <database> auth: user: <user> password: <password> outputs: - name: orders_output mode: overwrite from: <from> table: <collection>

Providers

mongodb

An example for provider mongodb:

Code
destinations: - name: orders type: nosql provider: mongodb # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: mongodb://<host>:27017 database: <database> auth: user: <user> password: <password> outputs: - name: orders_output mode: overwrite from: <from> table: <collection>

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
url (required)string--
database (required)string--
auth (required)object--
auth.user (required)string--
auth.password (required)string--

Output options

outputs[].options:

FieldTypeDefaultNotes
commentstring-The comment to append to the write operation. Comments appear in the output of the Database Profiler.
mongo_client_factorystring-MongoClientFactory configuration key. You can specify a custom implementation that must implement the com.mongodb.spark.sql.connector.connection.MongoClientFactory interface. Default: com.mongodb.spark.sql.connector.connection.DefaultMongoClientFactory. Maps to mongoClientFactory.
convert_jsonany or objectOrArrayOnly or false-Specifies if the connector parses string values and converts extended JSON into BSON. any: The connector converts all JSON values to BSON. objectOrArrayOnly: The connector converts only JSON objects and arrays to BSON. false: The connector leaves all values as strings. Default: false. Maps to convertJson.
id_field_liststring-Specifies a field or list of fields by which to split the collection data. To specify more than one field, separate them using a comma. Default: _id. Maps to idFieldList.
ignore_null_valuesboolean-When true, the connector ignores any null values when writing, including null values in arrays and nested documents. Default: false. Maps to ignoreNullValues.
max_batch_sizeinteger-Specifies the maximum number of operations to batch in bulk operations. Default: 512. Maps to maxBatchSize.
operation_typeinsert or replace or update-Specifies the type of write operation to perform. insert: Insert the data. replace: Replace an existing document that matches the idFieldList value with the new data. update: Update an existing document that matches the idFieldList value with the new data. Default: replace. Maps to operationType.
orderedboolean-Specifies whether to perform ordered bulk operations. Default: true.
upsert_documentboolean-When true, replace and update operations insert the data if no match exists. For time series collections, you must set upsertDocument to false. Default: true. Maps to upsertDocument.
write_concern_wstring-Specifies w, a write-concern option requesting acknowledgment that the write operation has propagated to a specified number of MongoDB nodes. Default: Acknowledged. Maps to writeConcern.w.
write_concern_journalboolean-Specifies j, a write-concern option requesting acknowledgment that the data has been written to the on-disk journal for the criteria specified in the w option. Maps to writeConcern.journal.
write_concern_w_timeoutinteger-Specifies wTimeoutMS, a write-concern option to return an error when a write operation exceeds the specified number of milliseconds. Must be a nonnegative integer. Maps to writeConcern.wTimeoutMS.
force_delete_temp_checkpoint_locationboolean-A Boolean value that specifies whether to delete existing checkpoint data. This setting applies only to streaming writes. Default: false. Maps to forceDeleteTempCheckpointLocation.
truncate_modetruncate or drop-Specifies the mode to use when truncating the collection. truncate: Truncate the collection. drop: Drop the collection. Default: truncate. Maps to truncateMode.
ignore_duplicates_on_insertboolean-Specifies whether to ignore duplicates when inserting. Default: false. Maps to ignoreDuplicatesOnInsert.

cassandra

An example for provider cassandra:

Code
destinations: - name: orders type: nosql provider: cassandra # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: <host>:9042 database: <database> auth: user: <user> password: <password> outputs: - name: orders_output mode: overwrite from: <from> table: <collection>

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
url (required)string--
database (required)string--
auth (required)object--
auth.user (required)string--
auth.password (required)string--

Output options

outputs[].options:

FieldTypeDefaultNotes
batch_sizeinteger-Number of rows per batch. Default: 100. Maps to spark.cassandra.output.batch.size.rows.
batch_size_bytesinteger-Maximum total size of a single batch (bytes). Default: 1024. Maps to spark.cassandra.output.batch.size.bytes.
concurrent_writesinteger-Maximum number of batches executed in parallel by a single Spark task. Default: 5. Maps to spark.cassandra.output.concurrent.writes.
consistency_levelALL or EACH_QUORUM or QUORUM or LOCAL_QUORUM or ONE or TWO or THREE or LOCAL_ONE or ANY or SERIAL or LOCAL_SERIAL-Consistency level for write operations. Default: LOCAL_QUORUM. Maps to spark.cassandra.output.consistency.level.
ignore_nullsboolean-Ignore null values when writing. Default: false. Maps to spark.cassandra.output.ignoreNulls.
ttlinteger-Time to live (TTL) in seconds for written rows. Maps to spark.cassandra.output.ttl.
timestampinteger-Timestamp in microseconds for written rows. Maps to spark.cassandra.output.timestamp.
if_not_existsboolean-Use IF NOT EXISTS clause when inserting. Default: false. Maps to spark.cassandra.output.ifNotExists.

dynamodb

An example for provider dynamodb:

Code
destinations: - name: orders type: nosql provider: dynamodb # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: https://dynamodb.<region>.amazonaws.com database: <database> auth: access_key: <access_key> secret_key: <secret_key> outputs: - name: orders_output mode: overwrite from: <from> table: <collection>

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
url (required)string--
database (required)string--
auth (required)object--
auth.access_key (required)string--
auth.secret_key (required)string--
auth.regionstring--

cosmosdb

An example for provider cosmosdb:

Code
destinations: - name: orders type: nosql provider: cosmosdb # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: https://<account>.documents.azure.com:443 database: <database> auth: account_key: <account_key> outputs: - name: orders_output mode: overwrite from: <from> table: <collection>

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
url (required)string--
database (required)string--
auth (required)object--
auth.account_key (required)string--

hbase

An example for provider hbase:

Code
destinations: - name: orders type: nosql provider: hbase # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: <host>:2181 database: <database> outputs: - name: orders_output mode: overwrite from: <from> table: <collection> catalog: <catalog>

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
url (required)string--
database (required)string--
authobject--
auth.userstring--
auth.passwordstring--

Output options

outputs[].options:

FieldTypeDefaultNotes
catalogstring-JSON string defining the HBase table schema and column mappings. Required for writing.
use_hbase_contextboolean-Whether to use HBaseContext for optimized operations. Default: true. Maps to hbase.spark.use.hbasecontext.
bulk_loadboolean-Enable bulk load mode for faster writes. Default: false. Maps to bulkload.
bulk_load_staging_directorystring-Staging directory for bulk load operations. Maps to bulkload.staging.dir.
timestampstring-Timestamp to use for writing data. Can be a specific timestamp or 'current'.
max_versionsinteger-Maximum number of versions to keep per cell. Maps to maxVersions.

elasticsearch

An example for provider elasticsearch:

Code
destinations: - name: orders type: nosql provider: elasticsearch # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: http://<host>:9200 database: <database> outputs: - name: orders_output mode: overwrite from: <from> table: <collection>

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
url (required)string--
database (required)string--

auth is one of:

Variant

Variant

Output options

outputs[].options:

FieldTypeDefaultNotes
nodes_wan_onlybooleantrueSet to true if connecting over WAN or through a load balancer. Disables node discovery. Default: false. Maps to es.nodes.wan.only.
write_operationindex or create or update or upsert-Write operation type. index: Index document (overwrites if exists). create: Create document (fails if exists). update: Update document (fails if not exists). upsert: Update or insert document. Default: index. Maps to es.write.operation.
mapping_idstring-Field name to use as document ID. If not specified, Elasticsearch generates IDs. Maps to es.mapping.id.
mapping_parentstring-Field name to use as parent document ID. Maps to es.mapping.parent.
mapping_joinstring-Field name to use for join field (parent-child relationships). Maps to es.mapping.join.
mapping_routingstring-Field name to use for document routing. Maps to es.mapping.routing.
mapping_versionstring-Field name to use as document version. Maps to es.mapping.version.
mapping_version_typeinternal or external or external_gte-Version type for document versioning. Maps to es.mapping.version.type.
batch_sizeinteger-Number of documents per batch. Default: 1000. Maps to es.batch.size.entries.
batch_size_bytesinteger-Maximum batch size (bytes). Default: 1MB. Maps to es.batch.size.bytes.
batch_write_retry_countinteger-Number of retries for failed batch writes. Default: 3. Maps to es.batch.write.retry.count.
batch_write_retry_waitstring-Wait time between retries (e.g., '10s', '1m'). Default: 10s. Maps to es.batch.write.retry.wait.
sslboolean-Enable SSL/TLS for connections. Default: false. Maps to es.net.ssl.

solr

An example for provider solr:

Code
destinations: - name: orders type: nosql provider: solr # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: http://<host>:8983/solr database: <database> auth: user: <user> password: <password> outputs: - name: orders_output mode: overwrite from: <from> table: <collection>

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
url (required)string--
database (required)string--
auth (required)object--
auth.user (required)string--
auth.password (required)string--

Output options

outputs[].options:

FieldTypeDefaultNotes
batch_sizeinteger1000Number of documents sent to Solr via HTTP call during indexing. Set higher if docs are small and memory is available. Default: 500.
commit_withininteger5000Sets commitWithin on indexing requests processed by SolrClient. Value should be in milliseconds. Default: None.
generate_unique_keybooleantrueGenerate unique value for each document before indexing if documents are missing the unique key (derived from Solr schema). Instead, UUIDUpdateProcessorFactory can be used. Default: false. Maps to gen_uniq_key.
soft_commitinteger10The interval (seconds) for soft commits, which make updates visible to search without the overhead of a hard commit. This allows for faster visibility of changes while still ensuring that data is eventually committed to stable storage. Default: None. Maps to soft_commit_secs.
solr_field_typesstring-Specify field type for fields written to Solr (e.g., rating,title). Only works if field names are not already defined in Solr schema.

firestore

An example for provider firestore:

Code
destinations: - name: orders type: nosql provider: firestore # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: project_id: <project_id> database: <database> outputs: - name: orders_output mode: overwrite from: <from> table: <collection>

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
project_id (required)string--
database (required)string--
urlstring--
authobject-Firestore auth. Provide service_account_json for GCP; omit for the emulator or to use Application Default Credentials.
auth.service_account_json (required)string-Inline GCP service account JSON.

rethinkdb

An example for provider rethinkdb:

Code
destinations: - name: orders type: nosql provider: rethinkdb # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: <host>:28015 database: <database> auth: user: <user> password: <password> outputs: - name: orders_output mode: overwrite from: <from> table: <collection>

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
url (required)string--
database (required)string--
auth (required)object--
auth.user (required)string--
auth.password (required)string--

couchdb

An example for provider couchdb:

Code
destinations: - name: orders type: nosql provider: couchdb # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: http://<host>:5984 database: <database> auth: user: <user> password: <password> outputs: - name: orders_output mode: overwrite from: <from> table: <collection>

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
url (required)string--
database (required)string--
auth (required)object--
auth.user (required)string--
auth.password (required)string--

Streaming query options

These apply to every output in a streaming pipeline:

FieldTypeDefaultNotes
output_modeappend or complete or updateappendOutput mode of the streaming query. append: only new rows; complete: full result table; update: only updated rows (since 2.0). Maps to outputMode.
trigger_intervalstring-Trigger interval for processing (e.g. '10 seconds', '1 minute'). When set, uses Trigger.ProcessingTime(interval). Maps to triggerInterval.
checkpoint_locationstring-Optional custom checkpoint directory. When not set, a default under /app/data/spark-checkpoints/ is used. Maps to checkpointLocation.
query_namestring-Name for the streaming query (for monitoring and debugging). Maps to queryName.

Related pages

  • Destinations
  • Connections
  • Pipeline Spec Overview
  • API Reference
Suggest edit
Last modified on November 26, 2026
JDBC DestinationsStream Destinations
On this page
  • Output fields
  • Minimal example
  • Providers
    • mongodb
    • cassandra
    • dynamodb
    • cosmosdb
    • hbase
    • elasticsearch
    • solr
    • firestore
    • rethinkdb
    • couchdb
  • Streaming query options
  • Related pages
YAML
YAML
YAML
YAML
YAML
YAML
YAML
YAML
YAML
YAML
YAML