Skip to main content

Class AppendRecordsRequest.Options

java.lang.Object
com.gpudb.protocol.AppendRecordsRequest.Options
Enclosing class:

public static final class AppendRecordsRequest.Options extends Object
A set of string constants for the AppendRecordsRequest parameter options.

Optional parameters.

  • Field Details

    • OFFSET

      public static final String OFFSET
      A positive integer indicating the number of initial results to skip from sourceTableName. Default is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT. The default value is ‘0’.
    • LIMIT

      public static final String LIMIT
      A positive integer indicating the maximum number of results to be returned from sourceTableName. Or END_OF_SET (-9999) to indicate that the max number of results should be returned. The default value is ‘-9999’.
    • EXPRESSION

      public static final String EXPRESSION
      Filter expression to apply to the sourceTableName. The default value is ”.
    • ORDER_BY

      public static final String ORDER_BY
      Comma-separated list of the columns to be sorted by from source table (specified by sourceTableName), e.g., ‘timestamp asc, x desc’. The ORDER_BY columns do not have to be present in fieldMap. The default value is ”.
    • UPDATE_ON_EXISTING_PK

      public static final String UPDATE_ON_EXISTING_PK
      Specifies the record collision policy for inserting source table records (specified by sourceTableName) into a target table (specified by tableName) with a primary key. If set to TRUE, any existing table record with primary key values that match those of a source table record being inserted will be replaced by that new record (the new data will be “upserted”). If set to FALSE, any existing table record with primary key values that match those of a source table record being inserted will remain unchanged, while the source record will be rejected and an 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: Upsert new records when primary keys match existing records.
      • FALSE: Reject new records when primary keys match existing records.
      The default value is FALSE.
    • TRUE

      public static final String TRUE
    • FALSE

      public static final String FALSE
    • ENABLE_INPLACE_UPDATES

      public static final String ENABLE_INPLACE_UPDATES
      Applies only when upserting (when UPDATE_ON_EXISTING_PK is TRUE). If set to TRUE, an existing record matched by primary key is modified in place. If set to FALSE, it is updated by deleting the existing record and inserting a replacement (delete and insert), which prevents the change from being reflected in dependent materialized views until they are refreshed. Supported values:The default value is TRUE.
    • IGNORE_EXISTING_PK

      public static final String IGNORE_EXISTING_PK
      Specifies the record collision error-suppression policy for inserting source table records (specified by sourceTableName) into a target table (specified by tableName) with a primary key, only used when not in upsert mode (upsert mode is disabled when UPDATE_ON_EXISTING_PK is FALSE). If set to TRUE, any source table record being inserted that is rejected for having primary key values that match those of an existing target table record will be ignored with no error generated. If FALSE, the rejection of any source table record for having primary key values matching an existing target table record will result in an error being raised. If the specified table does not have a primary key or if upsert mode is in effect (UPDATE_ON_EXISTING_PK is TRUE), then this option has no effect. Supported values:
      • TRUE: Ignore source table records whose primary key values collide with those of target table records.
      • FALSE: Raise an error for any source table record whose primary key values collide with those of a target table record.
      The default value is FALSE.
    • PK_CONFLICT_PREDICATE_HIGHER

      public static final String PK_CONFLICT_PREDICATE_HIGHER
      The record with higher value for the column resolves the primary-key insert conflict. The default value is ”.
    • PK_CONFLICT_PREDICATE_LOWER

      public static final String PK_CONFLICT_PREDICATE_LOWER
      The record with lower value for the column resolves the primary-key insert conflict. The default value is ”.
    • TRUNCATE_STRINGS

      public static final String TRUNCATE_STRINGS
      If set to TRUE, it allows inserting longer strings into smaller charN string columns by truncating the longer strings to fit. Supported values:The default value is FALSE.