PostgreSQL
Connecting is three moves: test the credentials, create the data source, then enrich it so the pack can answer from it. Use a read-only role: SELECT grants and default_transaction_read_only = on.
Connect
Section titled “Connect”-
Validate credentials first.
Terminal window edisyl data-sources test-connection --type postgres --config-file db.jsondb.json {"host": "db.example.com","port": 5432,"username": "edisyl_reader","password": "...","sslMode": "require"}A success returns
{ success: true, durationMs }. A failure returnssuccess: falsewith a human-readablemessagenaming the actual problem — the CLI only checks that the JSON is non-empty; the shape itself is validated server-side. -
Create the data source. This auto-creates a pack from the source name (pass
--pack-idto attach to an existing one instead).Terminal window DS=$(edisyl data-sources create --name "My Postgres" --type postgres \--config-file db.json --database analytics -j | jq -r '.id') -
Enrich it.
creatediscovers the tables and imports them by name.enrichlearns what the columns mean and how the tables join, and it never runs on its own. Until it finishes, questions about the data are declined. It can take up to an hour.Terminal window edisyl data-sources enrich "$DS"edisyl action watch <action-id> -
Find your new pack.
Terminal window edisyl pack list
Config reference
Section titled “Config reference”| Field | Required | Notes |
|---|---|---|
host |
Yes | Hostname only, no protocol |
port |
No | Defaults to 5432 |
username |
Yes | |
password |
Yes | |
sslMode |
No | disable, require, prefer, verify-ca, or verify-full. Defaults to require |
sslCert |
Only for verify-ca and verify-full |
PEM-encoded CA certificate |
The database isn’t part of the config. It goes on the --database flag.
Scoping the import
Section titled “Scoping the import”By default, create imports every table in the database. Add --schema <SCHEMA> to narrow it to one schema, or --admit <table>,<table> to start from a chosen list. See Choose what comes in, and Adding tables to a connected source for tables created later.
Next steps
Section titled “Next steps”- Teach & ask to start using the pack.
- Reusable connections if this account backs more than one database.
Was this page helpful?
Thanks for the feedback.
