/** * DuckLake Migration Utilities * @internal - Helper functions for migrating data to DuckLake format */ import { DuckDBService } from '../duckdb/service.js'; import { SpaceContextFactory } from '../context/SpaceContext.js'; export interface MigrationOptions { source: string | string[]; catalogName: string; tableName: string; spaceId?: string; format?: 'DELTA' | 'ICEBERG'; partitionBy?: string[]; overwrite?: boolean; validateSchema?: boolean; batchSize?: number; compressionType?: 'ZSTD' | 'SNAPPY' | 'LZ4' | 'GZIP' | 'NONE'; } export interface MigrationResult { success: boolean; tableName: string; rowCount: number; version: number; duration: number; errors?: string[]; } /** * Main migration utility class */ export declare class DuckLakeMigration { private duckdb; private spaceFactory?; private ducklakeService; private adapter?; constructor(duckdb: DuckDBService, spaceFactory?: SpaceContextFactory | undefined); /** * Migrate Parquet files to DuckLake */ migrateParquet(options: MigrationOptions): Promise; /** * Migrate CSV files to DuckLake */ migrateCSV(options: MigrationOptions & { csvOptions?: any; }): Promise; /** * Migrate from a SQL query result to DuckLake */ migrateFromQuery(options: MigrationOptions & { query: string; operation?: string; }): Promise; /** * Batch migrate multiple tables */ batchMigrate(migrations: MigrationOptions[]): Promise<{ total: number; successful: number; failed: number; results: MigrationResult[]; }>; /** * Validate migration before executing */ validateMigration(options: MigrationOptions): Promise<{ valid: boolean; warnings: string[]; errors: string[]; }>; } /** * Create migration tool handlers for MCP */ export declare function createMigrationToolHandlers(duckdb: DuckDBService, spaceFactory?: SpaceContextFactory): { 'ducklake.migrate_parquet': (input: any) => Promise; 'ducklake.migrate_csv': (input: any) => Promise; 'ducklake.migrate_query': (input: any) => Promise; 'ducklake.batch_migrate': (input: any) => Promise<{ total: number; successful: number; failed: number; results: MigrationResult[]; }>; 'ducklake.validate_migration': (input: any) => Promise<{ valid: boolean; warnings: string[]; errors: string[]; }>; }; //# sourceMappingURL=ducklake-migration.d.ts.map