What is Substreams?
Substreams for Solana Developers
Install the CLI
Other Ways of Consuming
Reference & Specs
Chains and endpoints
Substreams CLI reference
allows you to consume the data extracted from the blockchain through a SQL database.
Different Ways of Setting Up the SQL Consumption
Substreams offers two different ways of consuming data as SQL:
Using the Deployable Services (beta)
Using the SQL sink, which currently supports PostgresSQL and Clickhouse (recommended)
- Substreams:SQL Deployable Service (beta)
Use the Substreams CLI to easily send the data of your Substreams to a database. It also has support for
, so it's great for data analyts!
You can deploy a new service by using the
substreams alpha service
The StreamingFast Hosted Service deploys a remote database in the StreamingFast servers, so you don't have to take of the infrastructure.
If you want to manage your own infrastructure, you can set up a services environment locally using Docker.
- SQL sink (recommended)
Previous to the implementation of the Deployable Services, the Postgres Sink was used to send data to a database. This is still available and there are a lot developers using it.
In order to the send the data to a SQL database, your Substreams must have a
module that emits
object is something that the Postgres sink can understand, thus acting as a conversion layet between the data model of your Substreams and the table structure of the database.