DuckDbBulkImportPseudoTableType

An enumeration that is being used to define the type of staging (pseudo) table to be created during the bulk-import operations.

This enum defines the type of staging (pseudo) table created during bulk-import operations. It applies only to DuckDB.

It is used by all five bulk operations — BulkDelete, BulkDeleteByKey, BulkInsert, BulkMerge and BulkUpdate.

Enum Values

Name Description
Auto Currently behaves exactly like Memory — see the note below. This is the default.
Memory A session-private TEMP table (CREATE OR REPLACE TEMP TABLE ...). Safe for concurrent/multi-connection workloads.
Physical An ordinary, non-temporary table, shared by every session. Only safe for sequential (non-concurrent) workloads against the same target table.

Auto’s row-count-based resolution is not implemented yet — it currently maps straight to Memory regardless of how many rows are being bulk-imported. Physical is only used when explicitly requested. See Operations (DuckDB) for details.

Usability

Pass the value to the pseudoTableType argument of the target operation.

using (var connection = new DuckDBConnection(ConnectionString))
{
    var people = GetPeople(1000);
    var insertedRows = connection.BulkInsert(people,
        pseudoTableType: DuckDbBulkImportPseudoTableType.Physical);
}