UNPKG

@db2lake/driver-redshift

Version:

RedShift destination driver for db2lake

40 lines 1.26 kB
import { IRedshiftDriver, RedshiftConfig } from "./type"; /** * Implementation of the Redshift destination driver. * * @template T - Type of data being written to Redshift * @implements {IRedshiftDriver<T>} */ export declare class RedshiftDestinationDriver<T extends Record<string, any>> implements IRedshiftDriver<T> { private pool; private client; private config; /** * Creates an instance of RedshiftDestinationDriver. * @param {RedshiftConfig} config - Configuration for Redshift connection and operations */ constructor(config: RedshiftConfig); /** * Establishes a connection to the Redshift cluster. * Creates a connection pool and acquires an initial client. */ connect(): Promise<void>; /** * Creates the target table if it doesn't exist. * @private */ private createTable; /** * Inserts data in batches into the specified Redshift table. * * @param {T[]} rows - Array of data objects to insert * @returns {Promise<void>} */ insert(rows: T[]): Promise<void>; /** * Closes all connections and releases resources. */ close(): Promise<void>; } export { RedshiftConfig } from './type'; //# sourceMappingURL=index.d.ts.map