Class GPUdbColumnProperty

class gpudb.GPUdbColumnProperty[source]

Column properties used for GPUdb record data types. The properties are class-level read-only properties, so the user can use them as such:

GPUdbColumnProperty.prop_name
DATA = 'data'

Default property for all numeric and string type columns; makes the column available for GPU queries.

Type:

str

Valid only for select ‘string’ columns. Enables full text search–see Full Text Search for details and applicable string column types. Can be set independently of data and store_only.

Type:

str

STORE_ONLY = 'store_only'

Persist the column value but do not make it available to queries (e.g. GPUdb.filter())-i.e. it is mutually exclusive to the data property. Any ‘bytes’ type column must have a store_only property. This property reduces system memory usage.

Type:

str

DISK_OPTIMIZED = 'disk_optimized'

Works in conjunction with the data property for string columns. This property reduces system disk usage by disabling reverse string lookups. Queries like GPUdb.filter(), GPUdb.filter_by_list(), and GPUdb.filter_by_value() work as usual but GPUdb.aggregate_unique() and GPUdb.aggregate_group_by() are not allowed on columns with this property.

Type:

str

TIMESTAMP = 'timestamp'

Valid only for ‘long’ columns. Indicates that this field represents a timestamp and will be provided in milliseconds since the Unix epoch: 00:00:00 Jan 1 1970. Dates represented by a timestamp must fall between the year 1000 and the year 2900.

Type:

str

ULONG = 'ulong'

Valid only for ‘string’ columns. It represents an unsigned long integer data type. The string can only be interpreted as an unsigned long data type with minimum value of zero, and maximum value of 18446744073709551615.

Type:

str

UUID = 'uuid'

Valid only for ‘string’ columns. It represents an uuid data type. Internally, it is stored as a 128-bit integer.

Type:

str

DECIMAL = 'decimal'

Valid only for ‘string’ columns. It represents a SQL type NUMERIC(19, 4) data type. There can be up to 15 digits before the decimal point and up to four digits in the fractional part. The value can be positive or negative (indicated by a minus sign at the beginning). This property is mutually exclusive with the text_search property.

Type:

str

DATE = 'date'

Valid only for ‘string’ columns. Indicates that this field represents a date and will be provided in the format ‘YYYY-MM-DD’. The allowable range is 1000-01-01 through 2900-01-01. This property is mutually exclusive with the text_search property.

Type:

str

TIME = 'time'

Valid only for ‘string’ columns. Indicates that this field represents a time-of-day and will be provided in the format ‘HH:MM:SS.mmm’. The allowable range is 00:00:00.000 through 23:59:59.999. This property is mutually exclusive with the text_search property.

Type:

str

DATETIME = 'datetime'

Valid only for ‘string’ columns. Indicates that this field represents a datetime and will be provided in the format ‘YYYY-MM-DD HH:MM:SS.mmm’. The allowable range is 1000-01-01 00:00:00.000 through 2900-01-01 23:59:59.999. This property is mutually exclusive with the text_search property.

Type:

str

CHAR1 = 'char1'

This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 1 character.

Type:

str

CHAR2 = 'char2'

This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 2 characters.

Type:

str

CHAR4 = 'char4'

This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 4 characters.

Type:

str

CHAR8 = 'char8'

This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 8 characters.

Type:

str

CHAR16 = 'char16'

This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 16 characters.

Type:

str

CHAR32 = 'char32'

This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 32 characters.

Type:

str

CHAR64 = 'char64'

This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 64 characters.

Type:

str

CHAR128 = 'char128'

This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 128 characters.

Type:

str

CHAR256 = 'char256'

This property provides optimized memory, disk and query performance for string columns. Strings with this property must be no longer than 256 characters.

Type:

str

BOOLEAN = 'boolean'

This property provides optimized memory and query performance for int columns. Ints with this property must be between 0 and 1(inclusive)

Type:

str

INT8 = 'int8'

This property provides optimized memory and query performance for int columns. Ints with this property must be between -128 and +127 (inclusive)

Type:

str

INT16 = 'int16'

This property provides optimized memory and query performance for int columns. Ints with this property must be between -32768 and +32767 (inclusive)

Type:

str

IPV4 = 'ipv4'

This property provides optimized memory, disk and query performance for string columns representing IPv4 addresses (i.e. 192.168.1.1). Strings with this property must be of the form: A.B.C.D where A, B, C and D are in the range of 0-255.

Type:

str

ARRAY = 'array'

Valid only for ‘string’ columns. Indicates that this field contains an array. The value type and (optionally) the item count should be specified in parenthesis; e.g., ‘array(int, 10)’ for a 10-integer array. Both ‘array(int)’ and ‘array(int, -1)’ will designate an unlimited-length integer array, though no bounds checking is performed on arrays of any length.

Type:

str

JSON = 'json'

Valid only for ‘string’ columns. Indicates that this field contains values in JSON format.

Type:

str

VECTOR = 'vector'

Valid only for ‘bytes’ columns. Indicates that this field contains a vector of floats. The length should be specified in parenthesis, e.g., ‘vector(1000)’.

Type:

str

WKT = 'wkt'

Valid only for ‘string’ and ‘bytes’ columns. Indicates that this field contains geospatial geometry objects in Well-Known Text (WKT) or Well-Known Binary (WKB) format.

Type:

str

PRIMARY_KEY = 'primary_key'

This property indicates that this column will be part of (or the entire) primary key.

Type:

str

SOFT_PRIMARY_KEY = 'soft_primary_key'

This property indicates that this column will be part of (or the entire) soft primary key.

Type:

str

SHARD_KEY = 'shard_key'

This property indicates that this column will be part of (or the entire) shard key.

Type:

str

NULLABLE = 'nullable'

This property indicates that this column is nullable. However, setting this property is insufficient for making the column nullable. The user must declare the type of the column as a union between its regular type and ‘null’ in the avro schema for the record type in input parameter type_definition. For example, if a column is of type integer and is nullable, then the entry for the column in the avro schema must be: [‘int’, ‘null’].

The C++, C#, Java, and Python APIs have built-in convenience for bypassing setting the avro schema by hand. For those languages, one can use this property as usual and not have to worry about the avro schema for the record.

Type:

str

DICT = 'dict'

This property indicates that this column should be dictionary encoded. It can only be used in conjunction with restricted string (charN), int, long or date columns. Dictionary encoding is best for columns where the cardinality (the number of unique values) is expected to be low. This property can save a large amount of memory.

Type:

str

INIT_WITH_NOW = 'init_with_now'

For ‘date’, ‘time’, ‘datetime’, or ‘timestamp’ column types, replace empty strings and invalid timestamps with ‘NOW()’ upon insert.

Type:

str

INIT_WITH_UUID = 'init_with_uuid'

For ‘uuid’ type, replace empty strings and invalid UUID values with randomly-generated UUIDs upon insert.

Type:

str

UPDATE_WITH_NOW = 'update_with_now'

For ‘date’, ‘time’, ‘datetime’, or ‘timestamp’ column types, always update the field with ‘NOW()’ upon any update.

Type:

str