yaml
type: "io.kestra.plugin.mongodb.Load"

Bulk load documents in MongoDB using Kestra internal storage file.

Examples

yaml
id: mongodb_load
namespace: company.team

inputs:
  - id: file
    type: FILE

tasks:
  - id: load
    type: io.kestra.plugin.mongodb.Load
    connection:
      uri: "mongodb://root:example@localhost:27017/?authSource=admin"
    database: "my_database"
    collection: "my_collection"
    from: "{{ inputs.file }}"

Properties

collection

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

MongoDB collection.

connection

MongoDB connection properties.

database

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

MongoDB database.

from

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The source file.

chunk

  • Type: integer
  • Dynamic: ✔️
  • Required:
  • Default: 1000

Chunk size for every bulk request.

idKey

  • Type: string
  • Dynamic: ✔️
  • Required:

Use this key as ID.

removeIdKey

  • Type: boolean
  • Dynamic: ✔️
  • Required:
  • Default: true

Whether to remove idKey from the final document.

Outputs

deletedCount

  • Type: integer
  • Required:
  • Default: 0

insertedCount

  • Type: integer
  • Required:
  • Default: 0

matchedCount

  • Type: integer
  • Required:
  • Default: 0

modifiedCount

  • Type: integer
  • Required:
  • Default: 0

size

  • Type: integer
  • Required:

Definitions

io.kestra.plugin.mongodb.MongoDbConnection

  • uri
    • Type: string
    • Dynamic: ✔️
    • Required: ✔️
    • Min length: 1