You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add default header name generation for empty CSV headers (#40)
Empty or whitespace-only CSV headers are now automatically assigned default names (e.g., Column0, Column1) instead of causing errors, matching LumenWorks CsvReader behavior and fixing SQL bulk insert issues. Introduced CsvReaderOptions.DefaultHeaderName to allow customization of the generated header prefix. Added comprehensive tests for empty, whitespace, and custom header scenarios. Updated version numbers and changelog.
Copy file name to clipboardExpand all lines: project/Dataplat.Dbatools.Csv/CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Added
11
+
-**Empty header name generation** - Empty or whitespace-only CSV headers are now automatically assigned default names (e.g., `Column0`, `Column1`) instead of throwing errors. This matches LumenWorks CsvReader behavior and fixes SQL bulk insert failures when CSV files have missing header names.
12
+
-**`DefaultHeaderName` option** - New `CsvReaderOptions.DefaultHeaderName` property allows customizing the prefix for generated header names (default is `"Column"`).
0 commit comments