Keeps the rows a SQL query returns (Postgres, MySQL, MariaDB) in Nacre layers, a template per layer.
60
Keeps the rows a SQL query returns in Nacre layers — Postgres, MySQL or MariaDB, chosen by the URL. A row is a document, one column is its external_id, a template over its columns picks the layer, and a row the query stopped returning is a document that leaves the index. A watermark column is the row's version where the table has one; otherwise the row's own hash is, computed from the result the query already returned, so a sweep never reads a row twice.
docker run -v sql-state:/state \
-e NACRE_URL=https://nacre.example.com -e NACRE_TOKEN=... \
-e SQL_URL=postgres://reader:[email protected]:5432/wiki \
-e 'SQL_QUERY=SELECT id, kind, title, body, updated_at FROM pages WHERE published' \
-e 'SQL_LAYER=${kind}' -e 'SQL_CONTENT=${body}' -e SQL_VERSION=updated_at \
nacrecontextlayer/connector-sql:0.1.1
SQL_QUERY is the listing, every row streamed; SQL_ID, SQL_LAYER, SQL_TITLE and SQL_CONTENT are templates over the columns. SQL_VERSION names a watermark column and is the cheap path — a row edited without that column moving is not re-sent, which is the contract such a column already makes with everything that reads it. Rows are text only: a bytea makes the row a binary skip naming the column, because files live in object stores. The variables are in the connector's README.
…same as git…
…same as git… Tags: {version}, amd64 and arm64. ghcr.io/nacre-work/connectors/sql 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
Content type
Image
Digest
sha256:89d9b7dce…
Size
60.1 MB
Last updated
about 11 hours ago
docker pull nacrecontextlayer/connector-sql:0.1.1