Class CreateTableRequest

  • All Implemented Interfaces:
    org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

    public class CreateTableRequest
    extends Object
    implements org.apache.avro.generic.IndexedRecord
    A set of parameters for GPUdb.createTable.

    Creates a new table with the given type (definition of columns). The type is specified in typeId as either a numerical type ID (as returned by GPUdb.createType) or as a list of columns, each specified as a list of the column name, data type, and any column attributes.

    Example of a type definition with some parameters:

    
         [
             ["id", "int8", "primary_key"],
             ["dept_id", "int8", "primary_key", "shard_key"],
             ["manager_id", "int8", "nullable"],
             ["first_name", "char32"],
             ["last_name", "char64"],
             ["salary", "decimal"],
             ["hire_date", "date"]
         ]
     
    Each column definition consists of the column name (which should meet the standard column naming criteria), the column's specific type (int, long, float, double, string, bytes, or any of the properties map values from GPUdb.createType), and any data handling, data key, or data replacement properties.

    A table may optionally be designated to use a replicated distribution scheme, or be assigned: foreign keys to other tables, a partitioning scheme, and/or a tier strategy.