Kinetica   C#   API  Version 7.2.3.1
KineticaIngestor< T > Class Template Reference

Manages the insertion into GPUdb of large numbers of records in bulk, More...

Classes

class  InsertException
 

Public Member Functions

 KineticaIngestor (Kinetica kdb, string tableName, int batchSize, KineticaType ktype, Dictionary< string, string >? options=null, Utils.WorkerList? workers=null)
 
Int64 getCountInserted ()
 Returns the count of records inserted so far. More...
 
Int64 getCountUpdated ()
 Returns the count of records updated so far. More...
 
void flush ()
 Ensures that all queued records are inserted into Kinetica. More...
 
void insert (T record)
 Queues a record for insertion into Kinetica. More...
 
void insert (IList< T > records)
 Queues a list of records for insertion into Kinetica. More...
 

Public Attributes

Int64 count_inserted
 
Int64 count_updated
 

Properties

Kinetica kineticaDB [get]
 
string table_name [get]
 
int batch_size [get]
 
IDictionary< string, string > options [get]
 

Detailed Description

Manages the insertion into GPUdb of large numbers of records in bulk,

with automatic batch management and support for multi-head ingest. Use the insert(record) and insert(List) methods to queue records for insertion, and the flush method to ensure that all queued records have been inserted.

Template Parameters
TThe type of object being inserted.

This class is obsolete. Use BulkInserter<T> instead, which provides better performance, async support, and is consistent with the Rust API.

Definition at line 20 of file KineticaIngestor.cs.

Constructor & Destructor Documentation

◆ KineticaIngestor()

KineticaIngestor< T >.KineticaIngestor ( Kinetica  kdb,
string  tableName,
int  batchSize,
KineticaType  ktype,
Dictionary< string, string >?  options = null,
Utils.WorkerList?  workers = null 
)
inline

Parameters
kdb
tableName
batchSize
ktype
options
workers

Definition at line 68 of file KineticaIngestor.cs.

Member Function Documentation

◆ flush()

void KineticaIngestor< T >.flush ( )
inline

Ensures that all queued records are inserted into Kinetica.

If an error occurs while inserting the records from any queue, the records will no longer be in that queue nor in Kinetica; catch InsertException<T> to get the list of records that were being inserted if needed (for example, to retry). Other queues may also still contain unflushed records if this occurs.

Exceptions
InsertException<T>If the flushed records fail to insert

Definition at line 205 of file KineticaIngestor.cs.

◆ getCountInserted()

Int64 KineticaIngestor< T >.getCountInserted ( )
inline

Returns the count of records inserted so far.

An atomic operation.

Returns
The number of records inserted into Kinetica through this ingestor so far.

Definition at line 178 of file KineticaIngestor.cs.

◆ getCountUpdated()

Int64 KineticaIngestor< T >.getCountUpdated ( )
inline

Returns the count of records updated so far.

An atomic operation.

Returns
The number of records updated into Kinetica through this ingestor so far.

Definition at line 189 of file KineticaIngestor.cs.

◆ insert() [1/2]

void KineticaIngestor< T >.insert ( record)
inline

Queues a record for insertion into Kinetica.

If the queue reaches the configured batch size, all records in the queue will be inserted into Kinetica before the method returns. If an error occurs while inserting the records, the records will no longer be in the queue nor in Kinetica; catch InsertException<T> to get the list of records that were being inserted if needed (for example, to retry).

Parameters
recordThe record to insert.
Exceptions
InsertException<T>If the record cannot be inserted

Definition at line 272 of file KineticaIngestor.cs.

◆ insert() [2/2]

void KineticaIngestor< T >.insert ( IList< T >  records)
inline

Queues a list of records for insertion into Kinetica.

If any queue reaches the configured batch size, all records in that queue will be inserted into Kinetica before the method returns. If an error occurs while inserting the queued records, the records will no longer be in that queue nor in Kinetica; catch InsertException<T> to get the list of records that were being inserted (including any from the queue in question and any remaining in the list not yet queued) if needed (for example, to retry). Note that depending on the number of records, multiple calls to Kinetica may occur.

Parameters
recordsThe records to insert.
Exceptions
InsertException<T>If the records cannot be inserted

Definition at line 330 of file KineticaIngestor.cs.

Member Data Documentation

◆ count_inserted

Int64 KineticaIngestor< T >.count_inserted

Definition at line 49 of file KineticaIngestor.cs.

◆ count_updated

Int64 KineticaIngestor< T >.count_updated

Definition at line 50 of file KineticaIngestor.cs.

Property Documentation

◆ batch_size

int KineticaIngestor< T >.batch_size
get

Definition at line 46 of file KineticaIngestor.cs.

◆ kineticaDB

Kinetica KineticaIngestor< T >.kineticaDB
get

Definition at line 44 of file KineticaIngestor.cs.

◆ options

IDictionary<string, string> KineticaIngestor< T >.options
get

Definition at line 47 of file KineticaIngestor.cs.

◆ table_name

string KineticaIngestor< T >.table_name
get

Definition at line 45 of file KineticaIngestor.cs.


The documentation for this class was generated from the following file: