OpenFn / OpenFn/adaptors

mongo: Allow a database to be set in the credential

Open
#357 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
24
Forks
41
Avg merge
3d 13h
Merged PRs (30d)
12

Description

It would be a nicer user experience to not have to pass the database into each operation. For mongo jobs running against a single table, optionally specifying a database name would be neat.

The credential should be updated to support a databaseName string, and the operations need to be updated to use it.

Also note that the connection currently defaults to a test database. I think this is fine because it's not actually used (every operation will use(database) at the start.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the MongoDB credential definition and its operation entry points, then read how each operation currently receives and selects a database. Done means the credential accepts an optional databaseName and operations use it when provided, while existing per-operation database behavior remains supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.