Kinetica   C#   API  Version 7.2.3.1
KineticaAdo.CsvFileReader Class Reference

Reads CSV/TSV/PSV files and inserts records into Kinetica using bulk insert. More...

Public Member Functions

 CsvFileReader (Kinetica kinetica, InsertFromFileInfo fileInfo, KineticaType? tableType=null)
 Creates a new CsvFileReader for the specified table and file info. More...
 
async Task< long > ReadAndInsertAsync (CancellationToken cancellationToken=default)
 Reads the file(s) and inserts records into the table. More...
 
long ReadAndInsert ()
 Synchronous version of ReadAndInsertAsync. More...
 

Properties

long RecordsInserted [get]
 Gets the number of records successfully inserted. More...
 
long RecordsSkipped [get]
 Gets the number of records skipped due to errors. More...
 
List< string > Warnings = new() [get]
 Gets any warnings generated during processing. More...
 

Detailed Description

Reads CSV/TSV/PSV files and inserts records into Kinetica using bulk insert.

Supports local files and KiFS paths.

Definition at line 21 of file CsvFileReader.cs.

Constructor & Destructor Documentation

◆ CsvFileReader()

KineticaAdo.CsvFileReader.CsvFileReader ( Kinetica  kinetica,
InsertFromFileInfo  fileInfo,
KineticaType tableType = null 
)
inline

Creates a new CsvFileReader for the specified table and file info.

Parameters
kineticaThe Kinetica client.
fileInfoInformation about the file to read.
tableTypeThe table type schema (optional, will be discovered if not provided).

Definition at line 50 of file CsvFileReader.cs.

Member Function Documentation

◆ ReadAndInsert()

long KineticaAdo.CsvFileReader.ReadAndInsert ( )
inline

Synchronous version of ReadAndInsertAsync.

Definition at line 156 of file CsvFileReader.cs.

◆ ReadAndInsertAsync()

async Task<long> KineticaAdo.CsvFileReader.ReadAndInsertAsync ( CancellationToken  cancellationToken = default)
inline

Reads the file(s) and inserts records into the table.

Returns
Number of records inserted.

Definition at line 63 of file CsvFileReader.cs.

Property Documentation

◆ RecordsInserted

long KineticaAdo.CsvFileReader.RecordsInserted
get

Gets the number of records successfully inserted.

Definition at line 32 of file CsvFileReader.cs.

◆ RecordsSkipped

long KineticaAdo.CsvFileReader.RecordsSkipped
get

Gets the number of records skipped due to errors.

Definition at line 37 of file CsvFileReader.cs.

◆ Warnings

List<string> KineticaAdo.CsvFileReader.Warnings = new()
get

Gets any warnings generated during processing.

Definition at line 42 of file CsvFileReader.cs.


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