import * as glue from 'aws-cdk-lib/aws-glue'; import type { Construct } from 'constructs'; import type { ColumnDefinition } from './schema'; /** * Properties for creating a CSV table. */ export interface CsvTableProps { /** * The Glue database where the table will be created. */ readonly database: glue.CfnDatabase; /** * The s3 location containing the CSV files. */ readonly location: string; /** * The name of the table. * * @defaultValue - generated by CDK */ readonly name?: string; /** * The column as defined in the CSV files. */ readonly columns: Record; /** * The delimiter used in the CSV files. * * @defaultValue ';' */ readonly delimiter?: string; /** * Whether the CSV file has a header line. * * @defaultValue true */ readonly skipHeaderLine?: boolean; /** * Additional parameters for the LazySimpleSerDe. * * @see https://docs.aws.amazon.com/athena/latest/ug/lazy-simple-serde.html */ readonly serdeParameterOverrides?: Record; } /** * A Glue table representing CSV files in S3. * * Sample usage: * ```ts * new CsvTable(this, 'AccountAllocationsTable', { * database, * location: bucket.s3UrlForObject('allocations'), * name: 'account_allocations', * columns: { * account_id: { columnType: Schema.STRING }, * account_name: { columnType: Schema.STRING }, * allocation_principle: { columnType: Schema.STRING }, * comment: { columnType: Schema.STRING }, * }, * }); * ``` */ export declare class CsvTable extends glue.CfnTable { constructor(scope: Construct, id: string, props: CsvTableProps); }