Kinetica C# API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
kinetica.CreateTypeRequest Class Reference

A set of parameters for /create/type. More...

+ Inheritance diagram for kinetica.CreateTypeRequest:
+ Collaboration diagram for kinetica.CreateTypeRequest:

Classes

struct  Properties
 Each key-value pair specifies the properties to use for a given column where the key is the column name. More...
 

Public Member Functions

 CreateTypeRequest ()
 Constructs a CreateTypeRequest object with default parameters. More...
 
 CreateTypeRequest (string type_definition, string label, IDictionary< string, IList< string >> properties=null, IDictionary< string, string > options=null)
 Constructs a CreateTypeRequest object with the specified parameters. More...
 
- Public Member Functions inherited from kinetica.KineticaData
 KineticaData (KineticaType type)
 Constructor from Kinetica Type More...
 
 KineticaData (System.Type type=null)
 Default constructor, with optional System.Type More...
 
object Get (int fieldPos)
 Retrieve a specific property from this object More...
 
void Put (int fieldPos, object fieldValue)
 Write a specific property to this object More...
 

Properties

string type_definition [get, set]
 a JSON string describing the columns of the type to be registered. More...
 
string label [get, set]
 A user-defined description string which can be used to differentiate between tables and types with otherwise identical schemas. More...
 
IDictionary< string, IList
< string > > 
properties [get, set]
 Each key-value pair specifies the properties to use for a given column where the key is the column name. More...
 
IDictionary< string, string > options = new Dictionary<string, IList<string>>() [get, set]
 Optional parameters. More...
 
- Properties inherited from kinetica.KineticaData
Schema Schema [get]
 Avro Schema for this class More...
 

Additional Inherited Members

- Static Public Member Functions inherited from kinetica.KineticaData
static RecordSchema SchemaFromType (System.Type t, KineticaType ktype=null)
 Create an Avro Schema from a System.Type and a KineticaType. More...
 

Detailed Description

A set of parameters for /create/type.


Creates a new type describing the layout or schema of a table. The type definition is a JSON string describing the fields (i.e. columns) of the type. Each field consists of a name and a data type. Supported data types are: double, float, int, long, string, and bytes. In addition one or more properties can be specified for each column which customize the memory usage and query availability of that column. Note that some properties are mutually exclusive–i.e. they cannot be specified for any given column simultaneously. One example of mutually exclusive properties are data and store_only.
To set a primary key on one or more columns include the property 'primary_key' on the desired column_names. If a primary key is specified, then a uniqueness constraint is enforced, in that only a single object can exist with a given primary key. When /insert/records data into a table with a primary key, depending on the parameters in the request, incoming objects with primary keys that match existing objects will either overwrite (i.e. update) the existing object or will be skipped and not added into the set.
Example of a type definition with some of the parameters::
{"type":"record", "name":"point", "fields":[{"name":"msg_id","type":"string"}, {"name":"x","type":"double"}, {"name":"y","type":"double"}, {"name":"TIMESTAMP","type":"double"}, {"name":"source","type":"string"}, {"name":"group_id","type":"string"}, {"name":"OBJECT_ID","type":"string"}] }
Properties::
{"group_id":["store_only"], "msg_id":["store_only","text_search"] }

Definition at line 53 of file CreateType.cs.

Constructor & Destructor Documentation

kinetica.CreateTypeRequest.CreateTypeRequest ( )
inline

Constructs a CreateTypeRequest object with default parameters.

Definition at line 235 of file CreateType.cs.

kinetica.CreateTypeRequest.CreateTypeRequest ( string  type_definition,
string  label,
IDictionary< string, IList< string >>  properties = null,
IDictionary< string, string >  options = null 
)
inline

Constructs a CreateTypeRequest object with the specified parameters.

Parameters
type_definitiona JSON string describing the columns of the type to be registered.
labelA user-defined description string which can be used to differentiate between tables and types with otherwise identical schemas.
propertiesEach key-value pair specifies the properties to use for a given column where the key is the column name. All keys used must be relevant column names for the given table. Specifying any property overrides the default properties for that column (which is based on the column's data type).
optionsOptional parameters.

Definition at line 253 of file CreateType.cs.

Property Documentation

string kinetica.CreateTypeRequest.label
getset

A user-defined description string which can be used to differentiate between tables and types with otherwise identical schemas.

Definition at line 220 of file CreateType.cs.

IDictionary<string, string> kinetica.CreateTypeRequest.options = new Dictionary<string, IList<string>>()
getset

Optional parameters.

Definition at line 230 of file CreateType.cs.

IDictionary<string, IList<string> > kinetica.CreateTypeRequest.properties
getset

Each key-value pair specifies the properties to use for a given column where the key is the column name.

All keys used must be relevant column names for the given table. Specifying any property overrides the default properties for that column (which is based on the column's data type).

Definition at line 227 of file CreateType.cs.

string kinetica.CreateTypeRequest.type_definition
getset

a JSON string describing the columns of the type to be registered.

Definition at line 215 of file CreateType.cs.


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