v.22.6New Feature

Add Settings to Skip Initial Lines in CSV/TSV Formats

Add two new settings input_format_csv_skip_first_lines/input_format_tsv_skip_first_lines to allow skipping specified number of lines in the beginning of the file in CSV/TSV formats. #37537 (Kruglov Pavel).
Added two new settings input_format_csv_skip_first_lines and input_format_tsv_skip_first_lines to enable skipping a specified number of lines at the beginning of CSV and TSV files during import.

Why it matters

This feature allows users to skip header lines or any initial lines in CSV or TSV files that should not be processed as data, improving flexibility in handling input files with metadata or comments.

How to use it

Set the desired number of lines to skip by configuring the input_format_csv_skip_first_lines or input_format_tsv_skip_first_lines settings before importing the file. For example, in a query, use SET input_format_csv_skip_first_lines = N where N is the number of lines to skip.