Prerequisites
Confirm the following before connecting:- A reachable PostgreSQL host and port, a database name, and a username and password for a user that’s allowed to connect from DualEntry’s network. If your database sits behind a firewall or VPC, your platform team may need to allow DualEntry’s egress IPs on the PostgreSQL security group or network ACL (the connection log records the egress IP that was attempted, so you can confirm the value with your platform team during failed attempts).
- TLS configured on the database. DualEntry defaults to
sslmode=requireand supportsdisable,require,verify-ca, andverify-full. Production destinations should userequireor stricter. - Permission in DualEntry to create export destinations.
- Awareness that one active PostgreSQL export integration is allowed per organization. The same single-active rule applies to other export types (Snowflake, Qlik, Power BI).
How to connect
The connect flow is the same for every export destination: provide credentials, DualEntry validates them in the background, and on success the credentials land in AWS Secrets Manager and the integration shows as Connected.- In DualEntry, navigate to Settings → Integrations → PostgreSQL.
- Provide a display name for the destination, the integration type (
postgresql), and the credential fields from Prerequisites. - Choose Save. DualEntry returns immediately with the destination in Pending status - credential validation runs in the background.
- Wait for the destination to move from Pending to Testing to Validated. While testing, DualEntry opens a connection to PostgreSQL using your credentials with a 10-second connect timeout, then closes it. A successful open/close counts as validation.
- On success, the destination shows Validated, the linked integration shows Connected, and the credentials are written to AWS Secrets Manager. On failure, the destination shows Failed with an error message and the linked integration is set to Error.
Credential schema
DualEntry validates the credential payload against a fixed schema before attempting to connect. PostgreSQL reuses the generic database credentials schema;engine must be postgres.
The schema doesn’t collect a PostgreSQL schema name (namespace); downstream export jobs use the default search path for the given database and user, or pin the schema in their own configuration.
Disconnect
Disconnecting a PostgreSQL destination archives the export-secret row, marks the integration as Disconnected, and schedules deletion of the AWS Secrets Manager entry (subject to AWS’s secret recovery window). One blocking condition: you can’t disconnect while an AWS Glue export job tied to the integration is in a Running state - the disconnect call returns an error with the active job ID. Wait for the job to complete (or cancel it if appropriate), then retry the disconnect.Troubleshoot connection errors
Validation runs in the background, so symptoms surface in the destination’s status field and the linked integration’s error message.FAQ
Does DualEntry sync data into PostgreSQL automatically as part of this flow?
No. The connect flow registers and tests credentials, then stores them so that downstream export infrastructure (typically AWS Glue jobs) can write data into your database. The table layout, job cadence, and SQL for specific datasets are owned by your deployment’s export configuration, not by this integration.Where are passwords stored?
In AWS Secrets Manager, under a secret name that’s keyed to your organization and the destination’s identifier. The password never lands in DualEntry’s relational database.Can I use this for Amazon Redshift or an RDS for PostgreSQL instance?
Yes. Amazon RDS for PostgreSQL and Aurora PostgreSQL work withengine=postgres. Amazon Redshift uses engine=redshift on the same credential schema; the validation path is identical (psycopg2 connect with connect_timeout=10), so the operational notes above apply directly.
What other export destinations work the same way?
Snowflake, Qlik, and Power BI export destinations all share this connect flow, the same single-active-per-organization rule, and the same AWS Secrets Manager storage pattern. Only the credential schema differs per destination type.For maintainers
The details below describe the connect-flow plumbing, not user-facing features.- API endpoints (internal admin):
POST /api/integrations/exports/secrets/to create a destination.GET /api/integrations/exports/secrets/{secret_id}/to poll status.POST /api/integrations/exports/secrets/{secret_id}/disconnect/to disconnect.
- Credential schema class:
ExportDatabaseCredentialsSchema(shared across PostgreSQL, Redshift, MySQL, MariaDB, and SQL Server; dispatch is by theenginefield). The schema’smetadataproperty exposesengine,host,port, anddatabaseas the non-sensitive fields stored on the export-secret row’sdestination_metadata. - Background validation: the
provision_export_secretCelery task parses credentials, callspsycopg2.connectwithhost,port,database,user,password,sslmode, andconnect_timeout=10, then opens and closes the connection. A clean open/close counts as validation. Allowedsslmodevalues:disable,require,verify-ca,verify-full. - AWS Secrets Manager naming: secrets are stored at
dualentry/exports/org_{organization_id}/{name}_{secret_id}(built byExportSecret.build_secret_qual_name). If AWS reports the secret already exists, the task reuses the existing ARN and continues. - Disconnect uses AWS Secrets Manager’s scheduled deletion with the standard recovery window; reusing the same name within the recovery window will collide.
- Diagnostic log keys:
export_secret_provisioning_error(creation/validation failures),export_secret_ip_check(the egress IP DualEntry attempted from). Confirm with your platform team whether the IP-check path applies to your deployment. - Other export integration types (
snowflake,qlik,power_bi) follow the same lifecycle and share the single-active-per-organization rule.
