@db2lake/driver-snowflake
Version:
Snowflake destination driver for db2lake
47 lines • 1.38 kB
TypeScript
import { ISnowflakeDriver, SnowflakeConfig } from "./type";
/**
* Implementation of the Snowflake destination driver.
*
* @template T - Type of data being written to Snowflake
* @implements {ISnowflakeDriver<T>}
*/
export declare class SnowflakeDestinationDriver<T extends Record<string, any>> implements ISnowflakeDriver<T> {
private connection;
private config;
/**
* Creates an instance of SnowflakeDestinationDriver.
* @param {SnowflakeConfig} config - Configuration for Snowflake operations
*/
constructor(config: SnowflakeConfig);
/**
* Creates a Snowflake connection and initializes it.
*/
connect(): Promise<void>;
/**
* Creates the target table if it doesn't exist.
* @private
*/
private createTable;
/**
* Builds a column definition string for table creation.
* @private
*/
private buildColumnDefinition;
/**
* Executes a query and returns the result.
* @private
*/
private executeQuery;
/**
* Inserts data in batches into the specified Snowflake table.
*
* @param {T[]} rows - Array of data objects to insert
* @returns {Promise<void>}
*/
insert(rows: T[]): Promise<void>;
/**
* Closes the Snowflake connection and releases resources.
*/
close(): Promise<void>;
}
//# sourceMappingURL=index.d.ts.map