datapilot-cli
Version:
Enterprise-grade streaming multi-format data analysis with comprehensive statistical insights and intelligent relationship detection - supports CSV, JSON, Excel, TSV, Parquet - memory-efficient, cross-platform
51 lines • 1.49 kB
TypeScript
/**
* Data Preview Generator - Creates structured data samples for Section 1 Overview
* Generates configurable row previews with intelligent sampling strategies
*/
import type { DataPreview, Section1Config, Section1Warning } from './types';
export declare class DataPreviewGenerator {
private config;
private warnings;
constructor(config: Section1Config);
/**
* Generate data preview with configurable row count and sampling strategy
*/
generatePreview(filePath: string): Promise<DataPreview>;
/**
* Determine the best preview method based on file characteristics
*/
private determinePreviewMethod;
/**
* Generate preview showing first N rows (head strategy)
*/
private generateHeadPreview;
/**
* Generate preview using random sampling (sample strategy)
*/
private generateSampledPreview;
/**
* Generate preview using stratified sampling (stratified strategy)
*/
private generateStratifiedPreview;
/**
* Simple CSV line parser (handles basic quoting)
*/
private parseCSVLine;
/**
* Random sampling from array
*/
private randomSample;
/**
* Stratified sampling: take rows from beginning, middle, and end
*/
private stratifiedSample;
/**
* Get collected warnings
*/
getWarnings(): Section1Warning[];
/**
* Clear warnings
*/
clearWarnings(): void;
}
//# sourceMappingURL=data-preview-generator.d.ts.map