UNPKG

semantic-ds-toolkit

Version:

Performance-first semantic layer for modern data stacks - Stable Column Anchors & intelligent inference

64 lines 2.47 kB
import { ValidationRule } from './sql-generator'; export interface QuarantineConfig { tableName: string; sourceTable: string; retentionDays: number; enablePartitioning: boolean; enableIndexing: boolean; notificationConfig?: { enabled: boolean; thresholdPercent: number; webhookUrl?: string; emailRecipients?: string[]; }; autoCleanup: boolean; compressionEnabled: boolean; } export interface QuarantineRule { errorCode: string; severity: 'critical' | 'warning' | 'info'; autoResolve: boolean; escalationThreshold: number; description: string; } export interface QuarantineRecord { originalRecord: Record<string, any>; errorCode: string; errorDetails: string; quarantineTimestamp: string; sourceTable: string; validationRuleId: string; severity: string; retryCount: number; resolvedAt?: string; resolvedBy?: string; resolutionNotes?: string; } export interface QuarantineStats { totalRecords: number; byErrorCode: Record<string, number>; bySeverity: Record<string, number>; byTable: Record<string, number>; trendsLast30Days: Array<{ date: string; count: number; }>; resolutionRate: number; avgResolutionTime: number; } export declare class QuarantineManager { private templateEngine; constructor(); generateQuarantineTable(config: QuarantineConfig, validationRules: ValidationRule[], target: 'snowflake' | 'bigquery' | 'duckdb' | 'postgres'): string; generateQuarantineInsertTrigger(config: QuarantineConfig, target: 'snowflake' | 'bigquery' | 'duckdb' | 'postgres'): string; generateQuarantineCleanupJob(config: QuarantineConfig, target: 'snowflake' | 'bigquery' | 'duckdb' | 'postgres'): string; generateQuarantineMonitoring(config: QuarantineConfig, target: 'snowflake' | 'bigquery' | 'duckdb' | 'postgres'): string; generateQuarantineResolutionWorkflow(config: QuarantineConfig, target: 'snowflake' | 'bigquery' | 'duckdb' | 'postgres'): string; generateQuarantineNotificationSystem(config: QuarantineConfig, target: 'snowflake' | 'bigquery' | 'duckdb' | 'postgres'): string; private getQuarantineTableTemplate; private generateSnowflakeQuarantineTrigger; private generateBigQueryQuarantineTrigger; private generatePostgresQuarantineTrigger; private generateDuckDBQuarantineTrigger; } //# sourceMappingURL=quarantine-manager.d.ts.map