Kinetica C# API  Version 6.2.0.1
kinetica.KineticaIngestor< T > Class Template Reference

Manages the insertion into GPUdb of large numbers of records in bulk, with automatic batch management and support for multi-head ingest. More...

Classes

class  InsertException
 

Public Member Functions

 KineticaIngestor (Kinetica kdb, string table_name, int batch_size, 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 Kientica. 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.

Definition at line 15 of file KineticaIngestor.cs.

Constructor & Destructor Documentation

◆ KineticaIngestor()

kinetica.KineticaIngestor< T >.KineticaIngestor ( Kinetica  kdb,
string  table_name,
int  batch_size,
KineticaType  ktype,
Dictionary< string, string >  options = null,
Utils.WorkerList  workers = null 
)
inline

Parameters
kdb
table_name
batch_size
ktype
options
workers

Definition at line 65 of file KineticaIngestor.cs.

Member Function Documentation

◆ flush()

void kinetica.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 recoreds 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>

Definition at line 205 of file KineticaIngestor.cs.

◆ getCountInserted()

Int64 kinetica.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 179 of file KineticaIngestor.cs.

◆ getCountUpdated()

Int64 kinetica.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 190 of file KineticaIngestor.cs.

◆ insert() [1/2]

void kinetica.KineticaIngestor< T >.insert ( record)
inline

Queues a record for insertion into Kinetica.

If the queue reaches the <member cref="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>

Definition at line 272 of file KineticaIngestor.cs.

◆ insert() [2/2]

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

Queues a list of records for insertion into Kientica.

If any queue reaches the <member cref="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>

Definition at line 329 of file KineticaIngestor.cs.

Member Data Documentation

◆ count_inserted

Int64 kinetica.KineticaIngestor< T >.count_inserted

Definition at line 46 of file KineticaIngestor.cs.

◆ count_updated

Int64 kinetica.KineticaIngestor< T >.count_updated

Definition at line 47 of file KineticaIngestor.cs.

Property Documentation

◆ batch_size

int kinetica.KineticaIngestor< T >.batch_size
get

Definition at line 43 of file KineticaIngestor.cs.

◆ kineticaDB

Kinetica kinetica.KineticaIngestor< T >.kineticaDB
get

Definition at line 41 of file KineticaIngestor.cs.

◆ options

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

Definition at line 44 of file KineticaIngestor.cs.

◆ table_name

string kinetica.KineticaIngestor< T >.table_name
get

Definition at line 42 of file KineticaIngestor.cs.


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