SapHanaBulkImportPseudoTableType
This enum defines the type of staging (pseudo) table created during bulk-import operations. It applies only to SAP HANA.
It is used by every operation in RepoDb.SapHana.BulkOperations — BulkInsert, BulkMerge, BulkUpdate, BulkDelete, and BulkDeleteByKey.
Enum Values
| Name | Description |
|---|---|
| Auto | Intended to choose between Physical and Memory based on row count (Physical at 5,000 rows or more). This is the default. |
| Memory | Intended to back the operation with a HANA LOCAL TEMPORARY table. Rows would be session-private, isolating concurrent executions from different connections. |
| Physical | Backs the operation with an ordinary heap table, under a deterministic name derived from the table name, the operation, and this enum value (e.g. PhysicalPersonMerge) — not a per-call-unique name. Rows are not session-isolated, so concurrent callers targeting the same table with the same operation can see and interfere with each other’s staged rows. |
AutoandMemoryboth currently resolve toPhysicalat runtime — the internal resolution logic returnsPhysicalon every outcome, so theLOCAL TEMPORARY(session-isolated) path advertised byMemoryis not implemented yet despite the enum offering it. Combined withPhysical’s deterministic (non-unique) pseudo-table name, this means two concurrent bulk calls of the same operation against the same table currently always risk interfering with each other — unlike Db2BulkImportPseudoTableType (also currentlyPhysical-only, but that provider’s own concurrency caveats are less severe) or FirebirdBulkImportPseudoTableType/VerticaBulkImportPseudoTableType (both of which use a per-call-unique name regardless of type). Avoid running concurrent SAP HANA bulk operations of the same kind against the same table until this is resolved.
Usability
Pass the value to the pseudoTableType argument of the target operation.
using (var connection = new HanaConnection(connectionString))
{
var people = GetPeople(1000);
var insertedRows = connection.BulkInsert(people,
identityBehavior: SapHanaBulkImportIdentityBehavior.ReturnIdentity,
pseudoTableType: SapHanaBulkImportPseudoTableType.Physical);
}