Ingesting Data from PostgreSQL | Vendia

Ingesting Data from PostgreSQL

Connecting to PostgreSQL

To connect to PostgreSQL or PostgreSQL-compatible databases, you need to provide the following information:

Supported PostgreSQL-Compatible Databases

Vendia supports ingesting data from the following PostgreSQL-compatible databases:

Connection String Format

The connection string format for PostgreSQL is:

postgresql://[username]:[password]@[host]:[port]/[database]

Prerequisites

Before connecting to PostgreSQL, ensure that:

Required Permissions

The user account connecting to PostgreSQL must have the following permissions:

Example Configuration

Here’s an example of a typical PostgreSQL connection configuration:

Field Example Value
Name Production PostgreSQL Database
Host postgres-server.company.com
Port 5432
Database analytics_db
Schema public
Username vendia_user
Password *******
Use SSL Yes
Connection String postgresql://vendia_user:****@postgres-server.company.com:5432/analytics_db?sslmode=require

Vendia Supported and Unsupported PostgreSQL Data Types

Vendia Supported PostgreSQL Data Types Supported Aliases Vendia Unsupported PostgreSQL Data Types Unsupported Aliases
bigint int8 bigserial serial8
boolean bool bit [ (n) ]
character varying [ (n) ] varchar [ (n) ] bit varying [ (n) ] varbit [ (n) ]
date box
double precision float8 bytea
integer int, int4 character [ (n) ] char [ (n) ]
numeric [ (p, s) ] decimal [ (p, s) ] cidr
real float4 circle
text interval [ fields ] [ (p) ]
time [ (p) ] [ without time zone ] json
timestamp [ (p) ] [ without time zone ] jsonb
timestamp [ (p) ] with time zone ** timestamptz ** line
lseg
macaddr
macaddr8
money
path
pg_lsn
pg_snapshot
point
polygon
serial serial4
smallint int2
smallserial serial2
time [ (p) ] with time zone timetz
tsquery
tsvector
txid_snapshot
uuid
xml

** Note: Values of timezone-aware types are converted to the equivalent UTC value on ingestion.

Best Practices

Troubleshooting

If you encounter connection issues:

  1. Connection Refused: Verify the host address and port number are correct
  2. Authentication Failed: Check username, password, and authentication method (md5, scram-sha-256)
  3. Database Not Found: Confirm the database name exists and is accessible
  4. Schema Not Found: Verify the schema exists and the user has USAGE privileges
  5. Permission Denied: Ensure the user has SELECT privileges on tables and USAGE on schemas
  6. SSL Errors: Check SSL/TLS configuration and certificate settings
  7. Network Issues: Verify firewall rules
  8. Connection Limit: Check if the PostgreSQL server has reached max_connections

Next Steps

After successfully connecting to your PostgreSQL database, you can: