Postgres
Steps to add a Postgres database as a data destination
Step 1: Allow access
Create a rule in a security group or firewall settings to whitelist:
-incoming connections to your host and port (usually 5432) from the static IP used by the Fairing Data Service. This IP is 35.192.85.117.
-outgoing connections from ports 1024 to 65535 to the static IP used by the Fairing Data Service. This IP is 35.192.85.117.
Step 2: Create writer user
Create a database user to perform the writing of the source data.
- Open a connection to your PostgreSQL database.
- Create a user to be used by the data service by executing the following SQL command.
CREATE USER <username> PASSWORD '<some-password>';
- Grant user create and temporary privileges on the database. create allows the service to create new schemas and tables; temporary allows the service to create temporary tables (which is used during data loading).
GRANT CREATE, TEMPORARY ON DATABASE <database> TO <username>;
NOTE: If the schema already exists
By default, the service creates a new schema based on the destination configuration (in the next step). If you prefer to create the schema yourself before connecting the destination, you must ensure that the writer user has the proper permissions on the schema, using
GRANT ALL ON schema <schema> TO <username>;
Step 3: Connect Postgres to Fairing!
Use the form provided by Fairing to connect your Postgres database, using the user created in step 2.
Updated about 2 years ago