Class CsvDataSourcePlugin

java.lang.Object
org.elasticsearch.plugins.Plugin
org.elasticsearch.xpack.esql.datasource.csv.CsvDataSourcePlugin
All Implemented Interfaces:
Closeable, AutoCloseable, DataSourcePlugin

public class CsvDataSourcePlugin extends Plugin implements DataSourcePlugin
Data source plugin that provides CSV and TSV format support for ESQL external data sources.

This plugin registers two format readers:

  • csv — comma-delimited (.csv files)
  • tsv — tab-delimited (.tsv files)

Both readers use Jackson's CSV parser for robust parsing with proper quote and escape handling. They support:

  • Schema discovery from file headers (column_name:type_name format)
  • Column projection for efficient reads
  • Batch reading with configurable batch sizes
  • Direct conversion to ESQL Page format

The Jackson CSV dependency is isolated in this module to keep the core ESQL plugin free of third-party format libraries.