Find
yaml
type: "io.kestra.plugin.mongodb.Find"
Find documents
Examples
yaml
id: "find"
type: "io.kestra.plugin.mongodb.Find"
connection:
uri: "mongodb://root:example@localhost:27017/?authSource=admin"
database: "my_database"
collection: "my_collection"
filter:
_id:
$oid: 60930c39a982931c20ef6cd6
Properties
collection
- Type: string
- Dynamic: ✔️
- Required: ✔️
The mongodb collection.
connection
- Type: MongoDbConnection
- Dynamic: ❓
- Required: ✔️
The connection properties.
database
- Type: string
- Dynamic: ✔️
- Required: ✔️
The mongodb database.
filter
- Type: object
- Dynamic: ✔️
- Required: ❌
The mongodb bson filter
Can be a bson string, or a map
limit
- Type: integer
- Dynamic: ✔️
- Required: ❌
The number of records to return
projection
- Type: object
- Dynamic: ✔️
- Required: ❌
The mongodb bson projection
Can be a bson string, or a map
skip
- Type: integer
- Dynamic: ✔️
- Required: ❌
The number of records to skip
sort
- Type: object
- Dynamic: ✔️
- Required: ❌
The mongodb bson sort
Can be a bson string, or a map
store
- Type: boolean
- Dynamic: ❌
- Required: ❌
- Default:
false
Whether to store the data from the query result into an ion serialized data file
Outputs
rows
- Type: array
List containing the fetched data
Only populated if store
parameter is set to false.
size
- Type: integer
The size of the rows fetch
uri
- Type: string
The uri of store result
Only populated if store
is set to true.
Definitions
MongoDbConnection
uri
- Type: string
- Dynamic: ✔️
- Required: ✔️
- Min length:
1
Connection string to mongodb server
url format like mongodb://mongodb0.example.com:27017