> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# KineticaColumnProperties

> KineticaColumnProperties — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[avro\_schema\_builder](https://docs.kinetica.com/content/api/rust/avro_schema_builder/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L422-L424)&#x20;

<pre>`pub struct KineticaColumnProperties { /* private fields */ }`</pre>

Kinetica column properties

## Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L426-L653)
impl [KineticaColumnProperties](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.KineticaColumnProperties.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L427-L429)
pub fn [new](#method.new)() -> Self

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L432-L435)
pub fn [primary\_key](#method.primary_key)(self) -> Self

Marks this column as a primary key

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L438-L441)
pub fn [shard\_key](#method.shard_key)(self) -> Self

Marks this column as a shard key

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L444-L447)
pub fn [nullable](#method.nullable)(self) -> Self

Marks this column as nullable

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L450-L453)
pub fn [timestamp](#method.timestamp)(self) -> Self

Marks this column as a timestamp

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L456-L459)
pub fn [data](#method.data)(self) -> Self

Marks this column as data (generic data property)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L462-L465)
pub fn [ipv4](#method.ipv4)(self) -> Self

Marks this column as storing an IPv4 address

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L468-L471)
pub fn [wkt](#method.wkt)(self) -> Self

Marks this column as storing a WKT geometry

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L476-L479)
pub fn [char\_n](#method.char_n)(self, n: [usize](https://doc.rust-lang.org/1.98.1/std/primitive.usize.html)) -> Self

Marks this column with char(N) type: `charN`, for N of 1, 2, 4, 8, 16, 32, 64, 128 or 256. The server refuses another size when the type is created (“Unknown property: char3”).

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L482-L485)
pub fn [int8](#method.int8)(self) -> Self

Marks this column as int8 (1 byte signed integer)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L488-L491)
pub fn [int16](#method.int16)(self) -> Self

Marks this column as int16 (2 byte signed integer)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L494-L497)
pub fn [date](#method.date)(self) -> Self

Marks this column as a date

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L500-L503)
pub fn [time](#method.time)(self) -> Self

Marks this column as a time

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L506-L509)
pub fn [datetime](#method.datetime)(self) -> Self

Marks this column as a datetime

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L512-L515)
pub fn [decimal](#method.decimal)(self) -> Self

Marks this column as a decimal (SQL `NUMERIC(19,4)`, the server default)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L523-L526)
pub fn [decimal\_with\_precision](#method.decimal_with_precision)(self, precision: [u32](https://doc.rust-lang.org/1.98.1/std/primitive.u32.html), scale: [u32](https://doc.rust-lang.org/1.98.1/std/primitive.u32.html)) -> Self

Marks this column as a decimal with the given precision and scale, i.e. `decimal(P,S)`Written with no space after the comma: the form (`decimal\((\d+),(\d+)\)`) from which precision and scale are read back out of a type’s properties.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L529-L532)
pub fn [uuid](#method.uuid)(self) -> Self

Marks this column as storing a UUID

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L535-L538)
pub fn [ulong](#method.ulong)(self) -> Self

Marks this column as an unsigned long (0 to 18446744073709551615)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L541-L544)
pub fn [boolean](#method.boolean)(self) -> Self

Marks this column as a boolean (stored as int with 0/1 values)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L550-L553)
pub fn [text\_search](#method.text_search)(self) -> Self

Enables full text search on this (string) column

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L556-L559)
pub fn [json](#method.json)(self) -> Self

Marks this (string) column as holding JSON values

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L563-L566)
pub fn [array](#method.array)(self, item\_type: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html)) -> Self

Marks this (string) column as an unbounded array of `item_type` (e.g. `"int"`, `"long"`, `"double"`, `"string"`), i.e. `array(item_type)`

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L570-L573)
pub fn [array\_n](#method.array_n)(self, item\_type: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), len: [i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html)) -> Self

Marks this (string) column as an array of `item_type` holding at most `len` items, i.e. `array(item_type, len)`; a `len` of -1 means unbounded

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L577-L580)
pub fn [vector](#method.vector)(self, dimensions: [usize](https://doc.rust-lang.org/1.98.1/std/primitive.usize.html)) -> Self

Marks this (bytes) column as a vector of `dimensions` floats, i.e. `vector(dimensions)`

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L583-L586)
pub fn [soft\_primary\_key](#method.soft_primary_key)(self) -> Self

Marks this column as part of (or all of) the soft primary key

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L590-L593)
pub fn [compress](#method.compress)(self, codec: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html)) -> Self

Compresses this column with the given codec and optional level, i.e. `compress(codec)`; pass e.g. `"snappy"` or `"zstd(7)"`

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L596-L599)
pub fn [dict](#method.dict)(self) -> Self

Dictionary-encodes this column (charN, int, long or date columns)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L603-L606)
pub fn [init\_with\_now](#method.init_with_now)(self) -> Self

Replaces empty or invalid date/time/datetime/timestamp values with `NOW()` on insert

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L609-L612)
pub fn [init\_with\_uuid](#method.init_with_uuid)(self) -> Self

Replaces empty or invalid UUID values with a random UUID on insert

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L615-L618)
pub fn [update\_with\_now](#method.update_with_now)(self) -> Self

Sets this date/time/datetime/timestamp column to `NOW()` on any update

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L621-L624)
pub fn [update\_with\_user](#method.update_with_user)(self) -> Self

Sets this charN or string column to the current user’s name on any update

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L628-L631)
pub fn [default\_value](#method.default_value)(self, expr: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html)) -> Self

Sets a default value expression, i.e. `default(expr)`; pass e.g. `"0"`, `"'pending'"` or `"NOW()"`

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L638-L641)
pub fn [default\_sql](#method.default_sql)(self, expr: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html)) -> Self

Sets the SQL-syntax default expression shown in generated DDL, i.e. `default_sql(expr)`The parenthesised form here follows `default(expr)`. Use [`property`](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.KineticaColumnProperties#method.property) if a server expects something else.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L644-L647)
pub fn [property](#method.property)(self, prop: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>) -> Self

Adds a custom property

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L650-L652)
pub fn [build](#method.build)(self) -> [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>

Converts to the vector format expected by Kinetica

## Trait Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L421)
impl [Clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html) for [KineticaColumnProperties](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.KineticaColumnProperties.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L421)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [KineticaColumnProperties](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.KineticaColumnProperties.md)

Returns a duplicate of the value. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/142757)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/clone.rs.html#245-247)
fn [clone\_from](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)(\&mut self, source: \&Self)

Performs copy-assignment from `source`. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L421)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [KineticaColumnProperties](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.KineticaColumnProperties.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L421)
fn [fmt](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)(\&self, f: \&mut [Formatter](https://doc.rust-lang.org/1.98.1/core/fmt/struct.Formatter.html)\<'\_>) -> [Result](https://doc.rust-lang.org/1.98.1/core/fmt/type.Result.html)

Formats the value using the given formatter. [Read more](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L421)
impl [Default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html) for [KineticaColumnProperties](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.KineticaColumnProperties.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L421)
fn [default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)() -> [KineticaColumnProperties](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.KineticaColumnProperties.md)

Returns the “default value” for a type. [Read more](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.