PostgreSQL - Execute Query
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 | β | - | - | 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 | β | - | - | Name of the user to connect to the database with. |
Password | POSTGRES_PASSWORD | Password | β | - | - | Password associated to the provided username. |
Database | POSTGRES_DATABASE | Alphanumeric | β | - | - | Name of the database in the PostgreSQL to connect to. |
Extra URL Parameters | POSTGRES_URL_PARAMETERS | Alphanumeric | β | - | - | Extra parameters that will be placed at the end of the connection string, after the "?". Must be separated by "&". |
Query | POSTGRES_QUERY | Alphanumeric | β | - | - | Any SQL query that runs a job against the database (CREATE, DROP, INSERT, etc.). Formatting is ignored. |
YAMLβ
Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.
source:
blueprint: PostgreSQL - Execute Query
inputs:
POSTGRES_HOST: null ## REQUIRED
POSTGRES_PORT: '5432' ## REQUIRED
POSTGRES_USERNAME: null ## REQUIRED
POSTGRES_PASSWORD: null
POSTGRES_DATABASE: null ## REQUIRED
POSTGRES_URL_PARAMETERS: null
POSTGRES_QUERY: null ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '200'
- '221'
- '249'