DSN stands for Data Source Name (or Database Source Name) and defines how to connect to your database. The substreams-sink-sql tool expects a URL input that specifies the driver, connection details, and options.
The URL's scheme determines the database driver to use (postgres, clickhouse, etc.).
PostgreSQL
DSN Format
postgres://<user>:<password>@<host>:<port>/<database>?<options># Alternative schemes also supported:psql://<user>:<password>@<host>:<port>/<database>?<options>
Examples
# Basic connectionpostgres://myuser:mypassword@localhost:5432/mydatabase# With SSL disabledpostgres://myuser:mypassword@localhost:5432/mydatabase?sslmode=disable# With specific schemapostgres://myuser:mypassword@localhost:5432/mydatabase?schema=public# Multiple optionspostgres://myuser:mypassword@localhost:5432/mydatabase?sslmode=disable&schema=analytics
# Special characters in password
postgres://myuser:my%40password@localhost:5432/mydatabase
# Special characters in username
postgres://my%2Buser:mypassword@localhost:5432/mydatabase