Skip to main content

Databases

You can define a number of databases that your configuration will use in each of its actions.

Supported Databases:

Currently supported databases:

  • Postgres
    • CockroachDB
    • YugabyteDB
    • Timescale
    • Any postgres compatible databases
  • MySQL
    • MariaDB
    • TiDB
    • Any mysql compatible databases
  • SQLite
  • MSSQL / SqlServer
  • MongoDB
    • Azure Cosmos DB
    • Amazon DocumentDB

Defining Databases

To define a database create a databases block under global, the database section requires an identifier. For example main is used in all database Air Pipe examples.

You can use the identifier for each action to avoid repetition within a config.

For all database options and information on defining your connection strings view the database options under input.

Usage

name: login-api
metrics_enabled: true
docs: true

global:
variables:
SOME_SECRET: MY_SECRET

databases:
main:
driver: postgres
conn_string: |
postgresql://a|env::POSTGRES_USER|:a|env::POSTGRES_PASS|@a|env::POSTGRES_HOST|?connect_timeout=10"