PostgreSQL (meltano
variant)
Table of Contents
The target-postgres Meltano loader sends data into PostgreSQL after it was pulled from a source using an extractor.
Alternative variants #
Multiple
variants
of target-postgres are available.
This document describes the meltano variant.
Alternative variants are:
-
datamill-co -
transferwise(default)
Getting Started #
Prerequisites #
If you haven't already, follow the initial steps of the Getting Started guide:
Installation and configuration #
Using the Command Line Interface #
-
Add the
target-postgresloader to your project usingmeltano add:meltano add loader target-postgres --variant meltano -
Configure the settings below using
meltano config.
Next steps #
Follow the remaining steps of the Getting Started guide:
If you run into any issues, learn how to get help.
Capabilities #
Settings #
target-postgres requires the
configuration
of one of the following groups of settings:
These and other supported settings are documented below. To quickly find the setting you're looking for, use the Table of Contents at the top of the page.
User (user)
#
-
Environment variable:
TARGET_POSTGRES_USER - Default:
warehouse
How to use #
Manage this setting using
meltano config or an
environment variable:
meltano config target-postgres set user <user>
export TARGET_POSTGRES_USER=<user>
Password (password)
#
-
Environment variable:
TARGET_POSTGRES_PASSWORD - Default:
warehouse
How to use #
Manage this setting using
meltano config or an
environment variable:
meltano config target-postgres set password <password>
export TARGET_POSTGRES_PASSWORD=<password>
Host (host)
#
-
Environment variable:
TARGET_POSTGRES_HOST - Default:
localhost
How to use #
Manage this setting using
meltano config or an
environment variable:
meltano config target-postgres set host <host>
export TARGET_POSTGRES_HOST=<host>
Port (port)
#
-
Environment variable:
TARGET_POSTGRES_PORT - Default:
5502
How to use #
Manage this setting using
meltano config or an
environment variable:
meltano config target-postgres set port 5502
export TARGET_POSTGRES_PORT=5502
Database Name (dbname)
#
-
Environment variable:
TARGET_POSTGRES_DBNAME - Default:
warehouse
How to use #
Manage this setting using
meltano config or an
environment variable:
meltano config target-postgres set dbname <dbname>
export TARGET_POSTGRES_DBNAME=<dbname>
URL (url)
#
-
Environment variable:
TARGET_POSTGRES_URL
Lets you set user, password, host, port, and dbname in one
go using a postgresql:// URI.
Takes precedence over the other settings when set.
How to use #
Manage this setting using
meltano config or an
environment variable:
meltano config target-postgres set url <url>
export TARGET_POSTGRES_URL=<url>
Schema (schema)
#
-
Environment variable:
TARGET_POSTGRES_SCHEMA - Default:
$MELTANO_EXTRACT__LOAD_SCHEMA
Note that $MELTANO_EXTRACT__LOAD_SCHEMA will expand to the value of the load_schema extra for the extractor used in the pipeline, which defaults to the extractor’s namespace, e.g. tap_gitlab for tap-gitlab.
Name of the schema where the tables will be created. If schema_mapping
is not defined then every stream sent by the tap is loaded into this schema.
How to use #
Manage this setting using
meltano config or an
environment variable:
meltano config target-postgres set schema <schema>
export TARGET_POSTGRES_SCHEMA=<schema>Troubleshooting #
ld, clang, lssl, or linker Errors #
If you have an error message like:
ld: library not found for -lsslclang: error: linker command failed with exit code 1error: command 'clang' failed with exit status 1
These error messages indicates that there is a problem installing OpenSSL.
This Stack Overflow answer
has specific recommendations on setting the LDFLAGS and/or CPPFLAGS environment variables.
Set those prior to running meltano add loader target-postgres.
Looking for help? #
If you're having trouble getting the
target-postgres loader to work, look for an
existing issue in its repository, file a new issue,
or
join the Meltano Slack community
and ask for help in the #plugins-general channel.
Found an issue on this page? #
This page is generated from a YAML file that you can contribute changes to. Edit it on GitHub!