mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-22 08:38:08 +02:00
feat(cli): extend ktx connection test to every supported driver
Dispatch by driver: native DBs now call `connector.testConnection()` (was `introspect(dryRun)`), looker/notion/metabase hit their auth endpoints, and dbt/metricflow/lookml run `git ls-remote` via the existing `testRepoConnection` helper. Unknown drivers exit 1 with a listing of supported ones.
This commit is contained in:
parent
52dd89481c
commit
7ee9949cf5
7 changed files with 489 additions and 115 deletions
|
|
@ -370,6 +370,7 @@ export type {
|
|||
KtxQueryResult,
|
||||
KtxReadOnlyQueryInput,
|
||||
KtxResolvedCredentialEnvelope,
|
||||
KtxConnectorTestResult,
|
||||
KtxScanArtifactPaths,
|
||||
KtxScanConnector,
|
||||
KtxScanContext,
|
||||
|
|
|
|||
|
|
@ -283,12 +283,18 @@ export interface KtxTableListEntry {
|
|||
kind: 'table' | 'view';
|
||||
}
|
||||
|
||||
export interface KtxConnectorTestResult {
|
||||
success: boolean;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface KtxScanConnector {
|
||||
id: string;
|
||||
driver: KtxConnectionDriver;
|
||||
capabilities: KtxConnectorCapabilities;
|
||||
eventStreamDiscovery?: KtxEventStreamDiscoveryPort;
|
||||
introspect(input: KtxScanInput, ctx: KtxScanContext): Promise<KtxSchemaSnapshot>;
|
||||
testConnection?(): Promise<KtxConnectorTestResult>;
|
||||
sampleColumn?(input: KtxColumnSampleInput, ctx: KtxScanContext): Promise<KtxColumnSampleResult>;
|
||||
sampleTable?(input: KtxTableSampleInput, ctx: KtxScanContext): Promise<KtxTableSampleResult>;
|
||||
columnStats?(input: KtxColumnStatsInput, ctx: KtxScanContext): Promise<KtxColumnStatsResult | null>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue