target-postgres
is a loader that moves data into a PostgreSQL (same as Postgres) database. In order to use this target, you will need a Postgres database where Meltano can load data.
In this section, we provide a tutorial for installing Postgres and setting up a new Postgres database.
createdb <DATABASE_NAME>
psql <DATABASE_NAME>
createuser -s postgres
- this fixes the error: role "postgres" does not existALTER USER postgres WITH PASSWORD 'password';
with the new password of your choice\du
to get a list of users (from within psql)psql -U postgres
(by default, Postgres will log you into your username account on your machine so you will need to switch to the new user we created in the steps above)Once you have identified a PostgreSQL database where Meltano should load the data it extracts from your source(s), go to Meltano UI and complete Step 3 of the pipeline creation process.
Fill in the configuration fields with the necessary information to connect with your PostgreSQL database and click "Save". The Schema field is optional.
In this section we provide additional information for configuring Meltano to connect with your PostgreSQL databae from the Meltano command line interface (CLI).
.env
file in a text editorexport PG_ADDRESS=""
export PG_USERNAME=""
export PG_PORT=""
export PG_PASSWORD=""
export PG_DATABASE=""
export PG_SCHEMA=""