|
Kinetica C# API
Version 7.2.3.1
|
Record class with multiple shard key columns demonstrating allowed shard key types. More...
Inheritance diagram for Example.ShardKeyExample.ShardedRecord:
Collaboration diagram for Example.ShardKeyExample.ShardedRecord:Public Member Functions | |
| override string | ToString () |
| ShardKeyValues | GetShardKeyValues () |
| Returns shard key column names and their typed values. More... | |
Properties | |
| int | id [get, set] |
| Primary key - integer ID (also shard key) More... | |
| string | region_code = string.Empty [get, set] |
| Region code - CHAR4 shard key for geographic distribution More... | |
| int | category_id [get, set] |
| Category ID - INT16 shard key More... | |
| long | event_timestamp [get, set] |
| Event timestamp - stored as LONG (not part of shard key for simpler expression building) More... | |
| string | device_uuid = string.Empty [get, set] |
| Device UUID - stored for reference More... | |
| string | event_name = string.Empty [get, set] |
| Event name - regular string column More... | |
| double | event_value [get, set] |
| Event value - double (cannot be shard key) More... | |
| string | client_ip = string.Empty [get, set] |
| IP address of the client More... | |
| string | metadata = string.Empty [get, set] |
| Additional JSON metadata More... | |
Record class with multiple shard key columns demonstrating allowed shard key types.
The combination of all shard key columns determines the worker node for each record.
Note: For RecordRetriever to work properly, shard keys should be simple types (INT, LONG, STRING with charN) that can be easily expressed in filter expressions.
Definition at line 33 of file ShardKeyExample.cs.
|
inline |
Returns shard key column names and their typed values.
Only columns that are part of the shard key need to be included. The values are used for computing the routing hash to determine which worker node should receive the record.
For best performance, implement this method to avoid allocations when possible (e.g., use ShardKeyValues.Single() for single-column keys).
Implements IShardKeyExtractor.
Definition at line 75 of file ShardKeyExample.cs.
|
inline |
Definition at line 69 of file ShardKeyExample.cs.
|
getset |
Category ID - INT16 shard key
Definition at line 46 of file ShardKeyExample.cs.
|
getset |
IP address of the client
Definition at line 64 of file ShardKeyExample.cs.
|
getset |
Device UUID - stored for reference
Definition at line 55 of file ShardKeyExample.cs.
|
getset |
Event name - regular string column
Definition at line 58 of file ShardKeyExample.cs.
|
getset |
Event timestamp - stored as LONG (not part of shard key for simpler expression building)
Definition at line 52 of file ShardKeyExample.cs.
|
getset |
Event value - double (cannot be shard key)
Definition at line 61 of file ShardKeyExample.cs.
|
getset |
Primary key - integer ID (also shard key)
Definition at line 37 of file ShardKeyExample.cs.
|
getset |
Additional JSON metadata
Definition at line 67 of file ShardKeyExample.cs.
|
getset |
Region code - CHAR4 shard key for geographic distribution
Definition at line 43 of file ShardKeyExample.cs.