# MongoDB
The tap-mongodb
extractor pulls data from a MongoDB database.
- Repository: https://github.com/singer-io/tap-mongodb
- Maintainer: Stitch
- Maintenance status: Nonresponsive to community issues and contributions
- A more active fork may be available that you can use instead.
- This plugin is up for adoption!
# Getting Started
# Prerequisites
If you haven't already, follow the initial steps of the Getting Started guide:
# Installation and configuration
# Using the Command Line Interface
Add the
tap-mongodb
extractor to your project usingmeltano add
:meltano add extractor tap-mongodb
Configure the settings below using
meltano config
.
# Using Meltano UI
Start Meltano UI using
meltano ui
:meltano ui
Open the Extractors interface at http://localhost:5000/extractors.
Click the "Add to project" button for "MongoDB".
Configure the settings below in the "Configuration" interface that opens automatically.
# Next steps
Follow the remaining steps of the Getting Started guide:
If you run into any issues, learn how to get help.
# Settings
tap-mongodb
requires the configuration of the following settings:
# Minimal configuration
A minimal configuration of tap-mongodb
in your meltano.yml
project file will look like this:
plugins:
extractors:
- name: tap-mongodb
variant: singer-io
config:
host: mongodb.example.com
port: 27017
user: my_user
database: my_database
Sensitive values are most appropriately stored in the environment or your project's .env
file:
export TAP_MONGODB_PASSWORD=my_password
# Host
- Name:
host
- Environment variable:
TAP_MONGODB_HOST
- Default:
localhost
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-mongodb set host <host>
export TAP_MONGODB_HOST=<host>
# Port
- Name:
port
- Environment variable:
TAP_MONGODB_PORT
- Default:
27017
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-mongodb set port 27018
export TAP_MONGODB_PORT=27018
# User
- Name:
user
- Environment variable:
TAP_MONGODB_USER
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-mongodb set user <user>
export TAP_MONGODB_USER=<user>
# Password
- Name:
password
- Environment variable:
TAP_MONGODB_PASSWORD
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-mongodb set password <password>
export TAP_MONGODB_PASSWORD=<password>
# Database
- Name:
database
- Environment variable:
TAP_MONGODB_DATABASE
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-mongodb set database <database>
export TAP_MONGODB_DATABASE=<database>
# Replica Set
- Name:
replica_set
- Environment variable:
TAP_MONGODB_REPLICA_SET
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-mongodb set replica_set <replica_set>
export TAP_MONGODB_REPLICA_SET=<replica_set>
# SSL
- Name:
ssl
- Environment variable:
TAP_MONGODB_SSL
- Default:
false
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-mongodb set ssl true
export TAP_MONGODB_SSL=true
# Verify Mode
- Name:
verify_mode
- Environment variable:
TAP_MONGODB_VERIFY_MODE
- Default:
true
SSL verify mode
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-mongodb set verify_mode false
export TAP_MONGODB_VERIFY_MODE=false
# Include Schemas In Destination Stream Name
- Name:
include_schemas_in_destination_stream_name
- Environment variable:
TAP_MONGODB_INCLUDE_SCHEMAS_IN_DESTINATION_STREAM_NAME
- Default:
false
Forces the stream names to take the form <database_name>_<collection_name>
instead of <collection_name>
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-mongodb set include_schemas_in_destination_stream_name true
export TAP_MONGODB_INCLUDE_SCHEMAS_IN_DESTINATION_STREAM_NAME=true