Kinetica   C#   API  Version 7.2.3.1
IKineticaRecord Interface Reference

Interface for records that can be inserted into Kinetica. More...

+ Inheritance diagram for IKineticaRecord:

Public Member Functions

string GetAvroSchema ()
 Returns the Avro schema as a JSON string for this record type. More...
 

Detailed Description

Interface for records that can be inserted into Kinetica.

Equivalent to Rust's KineticaRecord trait.

Types implementing this interface can be used with the BulkInserter for high-performance data ingestion.

public class SensorReading : IKineticaRecord
{
public int Id { get; set; }
public string SensorName { get; set; }
public double Value { get; set; }
private static readonly string _schema = new AvroSchemaBuilder("SensorReading")
.IntField("id")
.StringField("sensor_name")
.DoubleField("value")
.Build();
public string GetAvroSchema() => _schema;
public static IReadOnlyDictionary<string, IList<string>> GetTypeProperties()
.PrimaryKey("id")
.Build();
}

Definition at line 36 of file IKineticaRecord.cs.

Member Function Documentation

◆ GetAvroSchema()

string IKineticaRecord.GetAvroSchema ( )

Returns the Avro schema as a JSON string for this record type.

The schema should be cached (e.g., in a static field) to avoid repeated string allocations.

Returns
A JSON string containing the Avro record schema.

Implemented in GenericRecord.


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