DuckDbBulkAppenderColumnMappingCollection
A collection used to define the source-to-destination column mappings of a DuckDbBulkAppender.
This class is a Collection<DuckDbBulkInsertMapItem> used to define the source-to-destination column mappings of a DuckDbBulkAppender.
It backs DuckDbBulkAppender’s ColumnMappings property. Its Add(sourceColumn, destinationColumn) overload creates and appends a DuckDbBulkInsertMapItem; a mapping can also be added directly via the base Collection<T>.Add(DuckDbBulkInsertMapItem).
Usability
using var appender = new DuckDbBulkAppender(connection)
{
DestinationTableName = "Person"
};
appender.ColumnMappings.Add("FirstName", "FName");
appender.ColumnMappings.Add("LastName", "LName");
When
ColumnMappingsis left empty, DuckDbBulkAppender maps every source column to a destination column of the same name.