VerticaBulkInsertMapItem
This class extends BulkInsertMapItem with an optional, explicit VerticaType to bind with for the mapped column. It is not currently consumed by the COPY-stream-based bulk-copy implementation — Vertica’s COPY parser infers each field’s wire format from the destination column’s actual server-side type — so it is kept only as a forward-looking escape hatch, matching the equivalent parameter on every other bulk-operations package’s map-item type.
Used by the Vertica BulkInsert, BulkMerge and BulkUpdate operations.
Create a new Instance
var mapItem = new VerticaBulkInsertMapItem("SourceId", "DestinationId");
Or with an explicit VerticaType:
var mapItem = new VerticaBulkInsertMapItem("SourceName", "DestinationName", VerticaType.VarChar);
Usage for BulkOperations
var mappings = new []
{
new VerticaBulkInsertMapItem("FirstName", "FName"),
new VerticaBulkInsertMapItem("LastName", "LName")
};
using (var connection = new VerticaConnection(connectionString))
{
var people = GetPeople(100000);
connection.BulkInsert(people, mappings: mappings);
}
The same approach applies to BulkMerge and BulkUpdate. The
mappingsargument is optional — omitting it causes the library to auto-map columns by name (case-insensitive).