Data Sources¶
Data sources are logical objects through which database connections can be acquired.
Property Format¶
Data sources are configured using properties in the following format:
dt.datasource.<name>.<property>=<value>
For available properties, and their environment variable equivalents, refer to the configuration reference.
Tip
When <name> is omitted, default is assumed.
This means that dt.datasource.url and dt.datasource.default.url are treated equally.
The default data source is required. It serves the REST API
and the vast majority of background processing.
Certain features accept a data source name instead of database connection details,
allowing them to use a dedicated connection pool. For example, the
database secret management provider
via dt.secret-management.database.datasource.name.
Multiple data sources
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
Note
Data sources are instantiated on first use. You can configure as many data sources as you like, but unless they're being used by a feature, they will not be created.
Connection Pool Properties¶
The following properties control local connection pooling per data source:
dt.datasource.<name>.pool.enableddt.datasource.<name>.urldt.datasource.<name>.usernamedt.datasource.<name>.passworddt.datasource.<name>.password-filedt.datasource.<name>.pool.max-sizedt.datasource.<name>.pool.min-idledt.datasource.<name>.pool.max-lifetime-msdt.datasource.<name>.pool.idle-timeout-ms
When deploying multiple instances, the total number of connections across all pools
must not exceed the PostgreSQL max_connections limit
(default: 100).
For centralised connection pooling with PgBouncer, see the database configuration guide.