Sign inSign up

nacrecontextlayer/connector-mongo

By nacrecontextlayer

•Updated about 13 hours ago

Keeps the documents a filter matches in a MongoDB collection in Nacre layers, a template per layer.

Image
Machine learning & AI
Data science
Databases & storage
0

59

nacrecontextlayer/connector-mongo repository overview

⁠Nacre connector — mongo

Keeps the documents of a MongoDB collection in Nacre⁠ layers. Every document a filter matches is a document, a field of it is the external_id, a template over its fields picks the layer, and a document gone from the result — deleted, or edited out of the filter — is a document that leaves the index. A field the deployment names is the version, so a sweep over a large collection maps only what moved; without one, the document's own hash is.

docker run -v mongo-state:/state \
  -e NACRE_URL=https://nacre.example.com -e NACRE_TOKEN=... \
  -e MONGO_URL=mongodb://sync:[email protected]:27017/corp -e MONGO_COLLECTION=articles \
  -e 'MONGO_FILTER={"status":"published"}' -e MONGO_VERSION=updated_at \
  -e 'MONGO_LAYER=${section}' -e 'MONGO_TITLE=${title}' -e 'MONGO_CONTENT=${body}' \
  nacrecontextlayer/connector-mongo:0.1.1

A template reaches an embedded document by a dotted path — ${author.name} — an ObjectId is hex, a Date is ISO, an array of scalars is joined. Text only: a Binary field is absent to a template and a mapping that names one skips the document by that name; files live in object stores and the s3 connector reads them. A replica set's connection string is accepted, and the credential in it never reaches /status. The variables are in the connector's README⁠.

⁠Every connector

…same as git…

⁠The product

…same as git… Tags: {version}, amd64 and arm64. ghcr.io/nacre-work/connectors/mongo is the canonical address; this repository is a mirror pushed by the same build at the same version.

nacre.work⁠ · All connectors⁠ · This connector's README⁠ · Nacre quickstart⁠ · Releases⁠

Tag summary

Content type

Image

Digest

sha256:62aca5f6f…

Size

60.9 MB

Last updated

about 13 hours ago

docker pull nacrecontextlayer/connector-mongo:0.1.1