All Resources

R-68

Technology

Tessera DB Tutorial: Connect a Postgres Database with Automatic Graph Endpoint Mapping

Wire up a Postgres source so Tessera mirrors your tables, auto-derives graph relationships from your foreign keys, and keeps in sync with incremental polling.

PAR2 Labs

August 29, 2026

7 min

Tessera DB Tutorial: Connect a Postgres Database with Automatic Graph Endpoint Mapping

If you already have data in Postgres, this is the fastest way to put it into Tessera. We'll connect a source, let Tessera discover the schema, auto-derive graph relationships from foreign keys, and set up incremental sync so updates keep flowing.

01

Before you start

Tier

01

Data-source connectors are an Enterprise feature. Version 1 ships production-validated PostgreSQL and REST API connectors; MySQL, MongoDB, S3/Parquet, and Kafka are on the roadmap.

What you'll need

01

A running Tessera server (see "Build your first hyperedge" if not).

02

A Postgres database with at least two tables and a foreign key between them.

03

Read-only credentials for that database.

02

Step 1: Open the connection wizard

In the admin dashboard, click Data Sources, then add a new source and choose the PostgreSQL connector.

03

Step 2: Enter credentials

Fill in host, port, user, password, and database name, using read-only credentials.

On password handling

01

With at-rest encryption enabled, connector credentials are encrypted on disk with authenticated encryption. Without it, they're stored in plaintext — fine for local dev, not for production. See "Enable at-rest encryption for connector credentials."

04

Step 3: Discover the schema

Rather than typing table names by hand, click Discover schema. Tessera connects, reads the database's own catalogue, and returns a checklist of every table — each annotated with its columns and any foreign keys.

Foreign-key columns are flagged with an auto graph endpoints badge: Tessera detected the relationship and will turn it into a real graph edge for you, no manual mapping required.

05

Step 4: Pick tables and apply

Tick the tables you want — say, a customers table and an orders table — and apply the selection. Tessera confirms how many graph relationships it auto-derived from your foreign keys (for example, orders linked to customers).

06

Step 5: Choose a sync mode

Manual — you trigger syncs from the dashboard when you want them.

Polling — Tessera pulls on an interval you set.

Foreign-key relationships are real graph edges, not flat property values.

07

Step 5: Choose a sync mode — for this tutorial

For this tutorial, pick polling on a short interval so you can watch it run.

08

Step 6: Turn on incremental sync

Enable incremental sync and choose a cursor column — a value that only ever increases on insert or update, such as an updated_at timestamp. On each poll, Tessera fetches only the rows newer than the last cursor value it saw.

The cursor advances to the newest value in each batch and is persisted with the source, so the next poll resumes from where the last one left off — even across server restarts.

09

Step 7: Verify with a dry-run preview

Before saving, run a preview. Tessera pulls a single row from each selected table and renders it across all five dimensions in side-by-side cards, so you can see exactly what each row becomes: a relational row, a graph hyperedge with named endpoints, indexed text, a vector embedding, and a bitemporal record. Nothing is inserted.

If anything looks wrong — a mis-mapped endpoint, the wrong cursor column — fix it now.

10

Step 8: Save and watch the first sync run

Save the source. It appears in the connected-sources list with its schedule. When the first sync fires, open the source's history panel: each attempt records its timestamp, how many rows were imported, the new cursor value, and any error. The next poll pulls only rows newer than that cursor.

11

What you have now

Your Postgres data is mirrored into Tessera as hyperedges. Foreign-key relationships are real graph edges, not flat property values. The data is indexed in all five dimensions, and updates flow in automatically with only the delta being pulled.

12

Try a query

Switch to the query editor and walk the auto-derived graph with Cypher:

cypher

MATCH (c:Customers)-[:orders]-(o:Orders)
WHERE o.total > 1000
RETURN c.email, count(o) AS big_orders
ORDER BY big_orders DESC
LIMIT 20

13

Try a query — what it walks

Tessera traverses the graph edges synthesised from your Postgres foreign keys. No graph-loading pipeline, no separate database, no sync job — just the same source data made queryable through a different lens.

Key Takeaways

01

Connected a PostgreSQL source with read-only credentials from the Data Sources wizard.

02

Used schema discovery to turn foreign keys into graph relationships without manual mapping.

03

Set up polling with incremental sync on a cursor column, and checked each table's mapping with a dry-run preview.

04

Walked the auto-derived graph with a Cypher query.


PAR2 Labs · Technology

Work With Us

Have a problem worth solving?