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

A set of parameters for Kinetica.updateRecords{T}(string,IList{string},IList{IDictionary{string, string}},IList{T},IDictionary{string, string}). More...

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

Classes

struct  Options
 Optional parameters. More...
 
struct  RecordEncoding
 Identifies which of and should be used. More...
 

Public Member Functions

 RawUpdateRecordsRequest ()
 Constructs a RawUpdateRecordsRequest object with default parameters. More...
 
 RawUpdateRecordsRequest (string table_name, IList< string > expressions, IList< IDictionary< string, string >> new_values_maps, IList< byte[]> records_to_insert=null, IDictionary< string, string > options=null)
 Constructs a RawUpdateRecordsRequest object with the specified parameters. More...
 
 RawUpdateRecordsRequest (string table_name, IList< string > expressions, IList< IDictionary< string, string >> new_values_maps, IList< byte[]> records_to_insert=null, IList< string > records_to_insert_str=null, string record_encoding=null, IDictionary< string, string > options=null)
 Constructs a RawUpdateRecordsRequest 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 table_name [get, set]
 Name of table to be updated, in [schema_name. More...
 
IList< string > expressions [get, set]
 A list of the actual predicates, one for each update; format should follow the guidelines /filter. More...
 
IList< IDictionary< string,
string > > 
new_values_maps = new List<string>() [get, set]
 List of new values for the matching records. More...
 
IList< byte[]> records_to_insert = new List<IDictionary<string, string>>() [get, set]
 An optional list of new binary-avro encoded records to insert, one for each update. More...
 
IList< string > records_to_insert_str = new List<byte[]>() [get, set]
 An optional list of JSON encoded objects to insert, one for each update, to be added if the particular update did not match any objects. More...
 
string record_encoding = new List<string>() [get, set]
 Identifies which of and should be used. More...
 
IDictionary< string, string > options = RecordEncoding.BINARY [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 Kinetica.updateRecords{T}(string,IList{string},IList{IDictionary{string, string}},IList{T},IDictionary{string, string}).


Runs multiple predicate-based updates in a single call. With the list of given expressions, any matching record's column values will be updated as provided in new_values_maps. There is also an optional 'upsert' capability where if a particular predicate doesn't match any existing record, then a new record can be inserted.
Note that this operation can only be run on an original table and not on a result view.
This operation can update primary key values. By default only 'pure primary key' predicates are allowed when updating primary key values. If the primary key for a table is the column 'attr1', then the operation will only accept predicates of the form: "attr1 == 'foo'" if the attr1 column is being updated. For a composite primary key (e.g. columns 'attr1' and 'attr2') then this operation will only accept predicates of the form: "(attr1 == 'foo') and (attr2 == 'bar')". Meaning, all primary key columns must appear in an equality predicate in the expressions. Furthermore each 'pure primary key' predicate must be unique within a given request. These restrictions can be removed by utilizing some available options through options.
The update_on_existing_pk option specifies the record primary key collision policy for tables with a primary key, while ignore_existing_pk specifies the record primary key collision error-suppression policy when those collisions result in the update being rejected. Both are ignored on tables with no primary key.

Definition at line 59 of file UpdateRecords.cs.

Constructor & Destructor Documentation

kinetica.RawUpdateRecordsRequest.RawUpdateRecordsRequest ( )
inline

Constructs a RawUpdateRecordsRequest object with default parameters.

Definition at line 771 of file UpdateRecords.cs.

kinetica.RawUpdateRecordsRequest.RawUpdateRecordsRequest ( string  table_name,
IList< string >  expressions,
IList< IDictionary< string, string >>  new_values_maps,
IList< byte[]>  records_to_insert = null,
IDictionary< string, string >  options = null 
)
inline

Constructs a RawUpdateRecordsRequest object with the specified parameters.

Parameters
table_nameName of table to be updated, in [schema_name.]table_name format, using standard name resolution rules. Must be a currently existing table and not a view.
expressionsA list of the actual predicates, one for each update; format should follow the guidelines /filter.
new_values_mapsList of new values for the matching records. Each element is a map with (key, value) pairs where the keys are the names of the columns whose values are to be updated; the values are the new values. The number of elements in the list should match the length of .
records_to_insertAn optional list of new binary-avro encoded records to insert, one for each update. If one of does not yield a matching record to be updated, then the corresponding element from this list will be added to the table. The default value is an empty List.
optionsOptional parameters.
  • GLOBAL_EXPRESSION: An optional global expression to reduce the search space of the predicates listed in . The default value is ''.
  • BYPASS_SAFETY_CHECKS: When set to true, all predicates are available for primary key updates. Keep in mind that it is possible to destroy data in this case, since a single predicate may match multiple objects (potentially all of records of a table), and then updating all of those records to have the same primary key will, due to the primary key uniqueness constraints, effectively delete all but one of those updated records. Supported values: The default value is FALSE.
  • UPDATE_ON_EXISTING_PK: Specifies the record collision policy for updating a table with a primary key. There are two ways that a record collision can occur. The first is an "update collision", which happens when the update changes the value of the updated record's primary key, and that new primary key already exists as the primary key of another record in the table. The second is an "insert collision", which occurs when a given filter in finds no records to update, and the alternate insert record given in (or ) contains a primary key matching that of an existing record in the table. If update_on_existing_pk is set to true, "update collisions" will result in the existing record collided into being removed and the record updated with values specified in taking its place; "insert collisions" will result in the collided-into record being updated with the values in / (if given). If set to false, the existing collided-into record will remain unchanged, while the update will be rejected and the error handled as determined by ignore_existing_pk. If the specified table does not have a primary key, then this option has no effect. Supported values:
    • TRUE: Overwrite the collided-into record when updating a record's primary key or inserting an alternate record causes a primary key collision between the record being updated/inserted and another existing record in the table
    • FALSE: Reject updates which cause primary key collisions between the record being updated/inserted and an existing record in the table
    The default value is FALSE.
  • IGNORE_EXISTING_PK: Specifies the record collision error-suppression policy for updating a table with a primary key, only used when primary key record collisions are rejected (update_on_existing_pk is false). If set to true, any record update that is rejected for resulting in a primary key collision with an existing table record will be ignored with no error generated. If false, the rejection of any update for resulting in a primary key collision will cause an error to be reported. If the specified table does not have a primary key or if update_on_existing_pk is true, then this option has no effect. Supported values:
    • TRUE: Ignore updates that result in primary key collisions with existing records
    • FALSE: Treat as errors any updates that result in primary key collisions with existing records
    The default value is FALSE.
  • UPDATE_PARTITION: Force qualifying records to be deleted and reinserted so their partition membership will be reevaluated. Supported values: The default value is FALSE.
  • TRUNCATE_STRINGS: If set to true, any strings which are too long for their charN string fields will be truncated to fit. Supported values: The default value is FALSE.
  • USE_EXPRESSIONS_IN_NEW_VALUES_MAPS: When set to true, all new values in are considered as expression values. When set to false, all new values in are considered as constants. NOTE: When true, string constants will need to be quoted to avoid being evaluated as expressions. Supported values: The default value is FALSE.
  • RECORD_ID: ID of a single record to be updated (returned in the call to /insert/records or /get/records/fromcollection).
The default value is an empty Dictionary.

Definition at line 1005 of file UpdateRecords.cs.

kinetica.RawUpdateRecordsRequest.RawUpdateRecordsRequest ( string  table_name,
IList< string >  expressions,
IList< IDictionary< string, string >>  new_values_maps,
IList< byte[]>  records_to_insert = null,
IList< string >  records_to_insert_str = null,
string  record_encoding = null,
IDictionary< string, string >  options = null 
)
inline

Constructs a RawUpdateRecordsRequest object with the specified parameters.

Parameters
table_nameName of table to be updated, in [schema_name.]table_name format, using standard name resolution rules. Must be a currently existing table and not a view.
expressionsA list of the actual predicates, one for each update; format should follow the guidelines /filter.
new_values_mapsList of new values for the matching records. Each element is a map with (key, value) pairs where the keys are the names of the columns whose values are to be updated; the values are the new values. The number of elements in the list should match the length of .
records_to_insertAn optional list of new binary-avro encoded records to insert, one for each update. If one of does not yield a matching record to be updated, then the corresponding element from this list will be added to the table. The default value is an empty List.
records_to_insert_strAn optional list of JSON encoded objects to insert, one for each update, to be added if the particular update did not match any objects. The default value is an empty List.
record_encodingIdentifies which of and should be used. Supported values: The default value is BINARY.
optionsOptional parameters.
  • GLOBAL_EXPRESSION: An optional global expression to reduce the search space of the predicates listed in . The default value is ''.
  • BYPASS_SAFETY_CHECKS: When set to true, all predicates are available for primary key updates. Keep in mind that it is possible to destroy data in this case, since a single predicate may match multiple objects (potentially all of records of a table), and then updating all of those records to have the same primary key will, due to the primary key uniqueness constraints, effectively delete all but one of those updated records. Supported values: The default value is FALSE.
  • UPDATE_ON_EXISTING_PK: Specifies the record collision policy for updating a table with a primary key. There are two ways that a record collision can occur. The first is an "update collision", which happens when the update changes the value of the updated record's primary key, and that new primary key already exists as the primary key of another record in the table. The second is an "insert collision", which occurs when a given filter in finds no records to update, and the alternate insert record given in (or ) contains a primary key matching that of an existing record in the table. If update_on_existing_pk is set to true, "update collisions" will result in the existing record collided into being removed and the record updated with values specified in taking its place; "insert collisions" will result in the collided-into record being updated with the values in / (if given). If set to false, the existing collided-into record will remain unchanged, while the update will be rejected and the error handled as determined by ignore_existing_pk. If the specified table does not have a primary key, then this option has no effect. Supported values:
    • TRUE: Overwrite the collided-into record when updating a record's primary key or inserting an alternate record causes a primary key collision between the record being updated/inserted and another existing record in the table
    • FALSE: Reject updates which cause primary key collisions between the record being updated/inserted and an existing record in the table
    The default value is FALSE.
  • IGNORE_EXISTING_PK: Specifies the record collision error-suppression policy for updating a table with a primary key, only used when primary key record collisions are rejected (update_on_existing_pk is false). If set to true, any record update that is rejected for resulting in a primary key collision with an existing table record will be ignored with no error generated. If false, the rejection of any update for resulting in a primary key collision will cause an error to be reported. If the specified table does not have a primary key or if update_on_existing_pk is true, then this option has no effect. Supported values:
    • TRUE: Ignore updates that result in primary key collisions with existing records
    • FALSE: Treat as errors any updates that result in primary key collisions with existing records
    The default value is FALSE.
  • UPDATE_PARTITION: Force qualifying records to be deleted and reinserted so their partition membership will be reevaluated. Supported values: The default value is FALSE.
  • TRUNCATE_STRINGS: If set to true, any strings which are too long for their charN string fields will be truncated to fit. Supported values: The default value is FALSE.
  • USE_EXPRESSIONS_IN_NEW_VALUES_MAPS: When set to true, all new values in are considered as expression values. When set to false, all new values in are considered as constants. NOTE: When true, string constants will need to be quoted to avoid being evaluated as expressions. Supported values: The default value is FALSE.
  • RECORD_ID: ID of a single record to be updated (returned in the call to /insert/records or /get/records/fromcollection).
The default value is an empty Dictionary.

Definition at line 1275 of file UpdateRecords.cs.

Property Documentation

IList<string> kinetica.RawUpdateRecordsRequest.expressions
getset

A list of the actual predicates, one for each update; format should follow the guidelines /filter.

Definition at line 510 of file UpdateRecords.cs.

IList<IDictionary<string, string> > kinetica.RawUpdateRecordsRequest.new_values_maps = new List<string>()
getset

List of new values for the matching records.

Each element is a map with (key, value) pairs where the keys are the names of the columns whose values are to be updated; the values are the new values. The number of elements in the list should match the length of .

Definition at line 519 of file UpdateRecords.cs.

IDictionary<string, string> kinetica.RawUpdateRecordsRequest.options = RecordEncoding.BINARY
getset

Optional parameters.

  • GLOBAL_EXPRESSION: An optional global expression to reduce the search space of the predicates listed in . The default value is ''.
  • BYPASS_SAFETY_CHECKS: When set to true, all predicates are available for primary key updates. Keep in mind that it is possible to destroy data in this case, since a single predicate may match multiple objects (potentially all of records of a table), and then updating all of those records to have the same primary key will, due to the primary key uniqueness constraints, effectively delete all but one of those updated records. Supported values: The default value is FALSE.
  • UPDATE_ON_EXISTING_PK: Specifies the record collision policy for updating a table with a primary key. There are two ways that a record collision can occur.
    The first is an "update collision", which happens when the update changes the value of the updated record's primary key, and that new primary key already exists as the primary key of another record in the table.
    The second is an "insert collision", which occurs when a given filter in finds no records to update, and the alternate insert record given in (or ) contains a primary key matching that of an existing record in the table.
    If update_on_existing_pk is set to true, "update collisions" will result in the existing record collided into being removed and the record updated with values specified in taking its place; "insert collisions" will result in the collided-into record being updated with the values in / (if given).
    If set to false, the existing collided-into record will remain unchanged, while the update will be rejected and the error handled as determined by ignore_existing_pk. If the specified table does not have a primary key, then this option has no effect. Supported values:
    • TRUE: Overwrite the collided-into record when updating a record's primary key or inserting an alternate record causes a primary key collision between the record being updated/inserted and another existing record in the table
    • FALSE: Reject updates which cause primary key collisions between the record being updated/inserted and an existing record in the table
    The default value is FALSE.
  • IGNORE_EXISTING_PK: Specifies the record collision error-suppression policy for updating a table with a primary key, only used when primary key record collisions are rejected (update_on_existing_pk is false). If set to true, any record update that is rejected for resulting in a primary key collision with an existing table record will be ignored with no error generated. If false, the rejection of any update for resulting in a primary key collision will cause an error to be reported. If the specified table does not have a primary key or if update_on_existing_pk is true, then this option has no effect. Supported values:
    • TRUE: Ignore updates that result in primary key collisions with existing records
    • FALSE: Treat as errors any updates that result in primary key collisions with existing records
    The default value is FALSE.
  • UPDATE_PARTITION: Force qualifying records to be deleted and reinserted so their partition membership will be reevaluated. Supported values: The default value is FALSE.
  • TRUNCATE_STRINGS: If set to true, any strings which are too long for their charN string fields will be truncated to fit. Supported values: The default value is FALSE.
  • USE_EXPRESSIONS_IN_NEW_VALUES_MAPS: When set to true, all new values in are considered as expression values. When set to false, all new values in are considered as constants. NOTE: When true, string constants will need to be quoted to avoid being evaluated as expressions. Supported values: The default value is FALSE.
  • RECORD_ID: ID of a single record to be updated (returned in the call to /insert/records or /get/records/fromcollection).

The default value is an empty Dictionary.

Definition at line 766 of file UpdateRecords.cs.

string kinetica.RawUpdateRecordsRequest.record_encoding = new List<string>()
getset

Identifies which of and should be used.

Supported values:

The default value is BINARY.

Definition at line 553 of file UpdateRecords.cs.

IList<byte[]> kinetica.RawUpdateRecordsRequest.records_to_insert = new List<IDictionary<string, string>>()
getset

An optional list of new binary-avro encoded records to insert, one for each update.

If one of does not yield a matching record to be updated, then the corresponding element from this list will be added to the table. The default value is an empty List.

Definition at line 528 of file UpdateRecords.cs.

IList<string> kinetica.RawUpdateRecordsRequest.records_to_insert_str = new List<byte[]>()
getset

An optional list of JSON encoded objects to insert, one for each update, to be added if the particular update did not match any objects.

The default value is an empty List.

Definition at line 533 of file UpdateRecords.cs.

string kinetica.RawUpdateRecordsRequest.table_name
getset

Name of table to be updated, in [schema_name.

]table_name format, using standard name resolution rules. Must be a currently existing table and not a view.

Definition at line 506 of file UpdateRecords.cs.


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