Overview
Execute any SQL query against a PostgreSQL database, without returning any of the resulting data. This Blueprint should primarily be used for queries that perform functionality other than SELECT, like multi-step SQL jobs, or DML statements.
Variables
|
Name |
Reference |
Type |
Required |
Default |
Options |
Description |
|---|---|---|---|---|---|---|
|
Host |
POSTGRES_HOST |
Alphanumeric |
✅ |
None |
- |
The domain or the IP address of the database you want to connect to. |
|
Port |
POSTGRES_PORT |
Integer |
✅ |
5432 |
- |
Number for the database port to connect to. Defaults to 5432. |
|
Username |
POSTGRES_USERNAME |
Alphanumeric |
✅ |
None |
- |
Name of the user to connect to the database with. |
|
Password |
POSTGRES_PASSWORD |
Password |
➖ |
None |
- |
Password associated to the provided username. |
|
Database |
POSTGRES_DATABASE |
Alphanumeric |
✅ |
None |
- |
Name of the database in the PostgreSQL to connect to. |
|
Extra URL Parameters |
POSTGRES_URL_PARAMETERS |
Alphanumeric |
➖ |
None |
- |
Extra parameters that will be placed at the end of the connection string, after the "?". Must be separated by "&". |
|
Query |
POSTGRES_QUERY |
Alphanumeric |
✅ |
None |
- |
Any SQL query that runs a job against the database (CREATE, DROP, INSERT, etc.). Formatting is ignored. |
YAML
Below is the YAML template
source:
template: PostgreSQL - Execute Query
inputs:
POSTGRES_HOST:
POSTGRES_PORT: '5432'
POSTGRES_USERNAME:
POSTGRES_PASSWORD:
POSTGRES_DATABASE:
POSTGRES_URL_PARAMETERS:
POSTGRES_QUERY:
type: TEMPLATE
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- 200
- 221
- 249