Skip to main content

Postgres Connection

Connection to a PostgreSQL database.

Examples​

connection:
postgres:
database: my_database
host: your-hostname
user: your-username
password: "${vaults.my_vault_name.password}"

PostgresConnection​

info

PostgresConnection is defined beneath the following ancestor nodes in the YAML structure:

Below are the properties for the PostgresConnection. Each property links to the specific details section further down in this page.

PropertyDefaultTypeRequiredDescription
descriptionstring
NoBrief description of what the model does.
metadataNoMeta information of a resource. In most cases it doesn't affect the system behavior but may be helpful to analyze project resources.
namestringYesThe name of the model
ssh_tunnelstring
No
postgresYes

Property Details​

Connection​

Data source/sink Connection.

PropertyDefaultTypeRequiredDescription
connectionOne of:
  S3Connection
  GcsConnection
  AbfsConnection
  LocalFileConnection
  SnowflakeConnection
  BigQueryConnection
  MSSQLConnection
  MySQLConnection
  OracleConnection
  PostgresConnection
  HttpConnection
  DuckDBConnection
  SFTPConnection
  DatabricksConnection
YesData system Connection.

PostgresConnectionOptions​

PostgreSQL Connection options.

PropertyDefaultTypeRequiredDescription
userstringYesUser to use for the DB Connection.
passwordstring
NoPassword to use for the DB Connection.
aws_iam_authAwsRoleBasedAuthentication
NoAWS IAM authentication to use for the DB Connection.
hoststringYesPostgreSQL host.
databasestringYesPostgreSQL database.
schemapublicstring
NoPostgreSQL schema.
portinteger
NoPostgreSQL port.

AwsRoleBasedAuthentication​

PropertyDefaultTypeRequiredDescription
aws_access_key_idstring
NoAWS access key ID to use for the DB Connection. If not provided, the default credential chain will be used.
aws_secret_access_keystring
NoAWS secret access key to use for the DB Connection. If not provided, the default credential chain will be used.
regionstring
NoAWS region to use for the DB Connection. If not provided, the default credential chain will be used.
role_arnstringYesAWS Role ARN to use for the DB Connection. Required for AWS IAM authentication.

ResourceMetadata​

Meta information of a resource. In most cases, it doesn't affect the system behavior but may be helpful to analyze Project resources.

PropertyDefaultTypeRequiredDescription
sourceNoThe origin or source information for the resource.
source_event_uuidstring
NoEvent UUID associated with creation of this resource.

ResourceLocation​

The origin or source information for the resource.

PropertyDefaultTypeRequiredDescription
pathstringYesPath within repository files where the resource is defined.
first_line_numberinteger
NoFirst line number within path file where the resource is defined.