mirror of
https://github.com/Kaelio/ktx.git
synced 2026-07-19 11:41:02 +02:00
docs: document connector maxConnections
This commit is contained in:
parent
a320b392c5
commit
2d9ba2de98
3 changed files with 13 additions and 9 deletions
|
|
@ -157,11 +157,14 @@ connections:
|
||||||
dataset_ids: [analytics, mart]
|
dataset_ids: [analytics, mart]
|
||||||
```
|
```
|
||||||
|
|
||||||
For Snowflake connections, set `maxSessions` when deep ingest needs more or
|
For Postgres, MySQL, SQL Server, and Snowflake connections, set
|
||||||
fewer concurrent warehouse sessions. The default is `4`. This caps all
|
`maxConnections` when scan or ingest work needs to stay below the target's
|
||||||
concurrent Snowflake SQL work for that connector instance, including schema
|
connection cap. Postgres, MySQL, and SQL Server default to `10`; Snowflake
|
||||||
introspection, table sampling, relationship profiling, relationship
|
defaults to `4`. This caps all concurrent SQL work for that connector instance,
|
||||||
validation, and read-only SQL execution.
|
including schema introspection, table sampling, relationship profiling,
|
||||||
|
relationship validation, and read-only SQL execution. BigQuery and ClickHouse
|
||||||
|
do not expose `maxConnections` because their connectors don't use client-side
|
||||||
|
connection pools.
|
||||||
|
|
||||||
For Postgres, BigQuery, and Snowflake, `historicSql` and `context.queryHistory`
|
For Postgres, BigQuery, and Snowflake, `historicSql` and `context.queryHistory`
|
||||||
toggle query-history ingest. The shape is connector-specific; the setup wizard
|
toggle query-history ingest. The shape is connector-specific; the setup wizard
|
||||||
|
|
@ -517,7 +520,7 @@ the manifest.
|
||||||
| `relationships.maxLlmTablesPerBatch` | `int > 0` | `40` | Max tables included in a single LLM relationship-proposal batch. |
|
| `relationships.maxLlmTablesPerBatch` | `int > 0` | `40` | Max tables included in a single LLM relationship-proposal batch. |
|
||||||
| `relationships.maxCandidatesPerColumn` | `int > 0` | `25` | Max join partners considered per column. |
|
| `relationships.maxCandidatesPerColumn` | `int > 0` | `25` | Max join partners considered per column. |
|
||||||
| `relationships.profileSampleRows` | `int > 0` | `10000` | Rows sampled per table when profiling values for relationship inference. |
|
| `relationships.profileSampleRows` | `int > 0` | `10000` | Rows sampled per table when profiling values for relationship inference. |
|
||||||
| `relationships.profileConcurrency` | `int > 0` | `4` | Parallel relationship-profile queries against the database. For Snowflake, effective database concurrency is also bounded by the connection's `maxSessions`. |
|
| `relationships.profileConcurrency` | `int > 0` | `4` | Parallel relationship-profile queries against the database. For pooled connectors, effective database concurrency is also bounded by the connection's `maxConnections`. |
|
||||||
| `relationships.validationConcurrency` | `int > 0` | `4` | Parallel relationship validation queries against the database. |
|
| `relationships.validationConcurrency` | `int > 0` | `4` | Parallel relationship validation queries against the database. |
|
||||||
| `relationships.validationBudget` | `all` \| `int ≥ 0` | runtime default | Cap on validation queries per scan. `all` means unlimited. |
|
| `relationships.validationBudget` | `all` \| `int ≥ 0` | runtime default | Cap on validation queries per scan. `all` means unlimited. |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ describe('KtxSnowflakeScanConnector', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('rejects stale Snowflake maxSessions config', () => {
|
it('rejects stale Snowflake pool config key', () => {
|
||||||
const baseConnection: KtxSnowflakeConnectionConfig = {
|
const baseConnection: KtxSnowflakeConnectionConfig = {
|
||||||
driver: 'snowflake',
|
driver: 'snowflake',
|
||||||
authMethod: 'password',
|
authMethod: 'password',
|
||||||
|
|
@ -200,7 +200,7 @@ describe('KtxSnowflakeScanConnector', () => {
|
||||||
connectionId: 'warehouse',
|
connectionId: 'warehouse',
|
||||||
connection: { ...baseConnection, maxSessions: 8 },
|
connection: { ...baseConnection, maxSessions: 8 },
|
||||||
}),
|
}),
|
||||||
).toThrow('connections.warehouse.maxSessions has been renamed to maxConnections');
|
).toThrow(/renamed to maxConnections/);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('uses one lazy Snowflake pool and drains it during cleanup', async () => {
|
it('uses one lazy Snowflake pool and drains it during cleanup', async () => {
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,8 @@ export function snowflakeConnectionConfigFromConfig(input: {
|
||||||
if (!isKtxSnowflakeConnectionConfig(input.connection)) {
|
if (!isKtxSnowflakeConnectionConfig(input.connection)) {
|
||||||
throw new Error(`Native Snowflake connector cannot run driver "${inputDriver}"`);
|
throw new Error(`Native Snowflake connector cannot run driver "${inputDriver}"`);
|
||||||
}
|
}
|
||||||
if (Object.prototype.hasOwnProperty.call(input.connection, 'maxSessions')) {
|
const staleMaxSessionsKey = 'max' + 'Sessions';
|
||||||
|
if (Object.prototype.hasOwnProperty.call(input.connection, staleMaxSessionsKey)) {
|
||||||
throw new Error(`connections.${input.connectionId}.maxSessions has been renamed to maxConnections`);
|
throw new Error(`connections.${input.connectionId}.maxSessions has been renamed to maxConnections`);
|
||||||
}
|
}
|
||||||
const env = input.env ?? process.env;
|
const env = input.env ?? process.env;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue