For the complete documentation index, see llms.txt. This page is also available as Markdown.

Neon

This walkthrough connects a Hosted Sink to a Neon serverless Postgres database.

1. Create a Neon Project

  1. Sign in to console.neon.tech and click New project.

  2. Choose a name, Postgres version, and a region close to StreamingFast's infrastructure.

  3. Neon creates a default database (neondb) and branch (main) automatically.

2. Get Connection Credentials

In your project, go to the Dashboard and open the Connection Details panel. Select:

  • Branch: main

  • Database: your target database (default: neondb)

  • Role: neondb_owner or a role you create

The connection string looks like:

postgres://<user>:<password>@<endpoint-host>.neon.tech/neondb?sslmode=require

Pull the individual fields from it:

Field
Example

Host

ep-quiet-forest-a1b2c3d4.us-east-2.aws.neon.tech

Port

5432

Database

neondb

User

neondb_owner

Password

shown once — copy it now

Open the Neon SQL Editor and run:

Replace substreams with your intended schema name.

4. Configure the Hosted Sink

In The Graph Market, create a new sink and fill in the Output section:

Field
Value

Host

ep-<name>.<region>.aws.neon.tech

Port

5432

Database

neondb (or your database name)

Schema

substreams (or the schema you created above)

User

substreams_sink

Password

Password for that role

SSL Mode

require

5. Deploy

Complete the remaining sink configuration (package, execution settings) and click Deploy sink. The sink will connect to your Neon database and begin writing data.

Troubleshooting

Endpoint suspended on first connect — Neon free-tier endpoints auto-suspend. The sink will retry on reconnect but may log an initial connection error. This is transient; the endpoint wakes within a few seconds.

SSL required — Neon requires SSL. Set SSL Mode to require; disable will be rejected.

Permission denied on new tables — Run ALTER DEFAULT PRIVILEGES IN SCHEMA substreams GRANT ALL ON TABLES TO substreams_sink; so that tables created by the sink are automatically accessible to the role.

Last updated

Was this helpful?