Attribute structure
All attributes share a common structure based on the platform’s type system:id(number): Unique identifier for the attributename(string): Machine-readable nametype(string): One of the supported types
display_name(string): Human-readable name for UI displaydescription(string): Explanation of the attribute’s purposevalidations(string[]): Array of validation rulesmetadata(object): Additional metadata including co-occurrence data
Primitive types
Primitive types represent basic data values.| Type | Description | NQL equivalent | Example values |
|---|---|---|---|
string | Variable-length text | VARCHAR | "hello", "[email protected]" |
long | Whole numbers (64-bit signed) | BIGINT | 42, -17, 0 |
double | Double-precision decimal | DOUBLE | 3.14159, -0.001 |
boolean | True or false | BOOLEAN | true, false |
timestamptz | Date and time with timezone | TIMESTAMP | 2024-01-15T14:30:00Z |
String
Variable-length Unicode text. Can optionally include anenum property to restrict allowed values.
Basic definition:
enum property, only those values are allowed. Values are case-sensitive.
Long
64-bit signed whole numbers. Range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Definition:Double
Double-precision (64-bit) floating-point numbers. Definition:Boolean
True or false values. Definition:Timestamptz
Date and time with timezone, stored in UTC. Follows ISO 8601 format. Definition:Object type
Objects group related fields into a single composite value. Useproperties to define the fields and required to specify which fields are mandatory.
Definition:
properties: Object mapping field names to field definitionsrequired: Array of field names that must be present
Array type
Arrays contain multiple values of the same type. Definition:items: Definition of the element type
Reference type
References link to other attribute definitions using their numeric ID. This enables reuse of standardized definitions. Definition:$ref: The numeric ID of the referenced attribute
- The field inherits the full type definition of the referenced attribute
- Validations from the referenced attribute apply
- Changes to the referenced attribute automatically propagate
- Reusing standardized definitions (like
event_timestamp) - Ensuring consistency across attributes
- Building complex schemas from well-defined components
Validation strings
Validations are specified as an array of strings. Common validation patterns:String validations
| Validation | Description | Example |
|---|---|---|
min_length:N | Minimum character count | "min_length:1" |
max_length:N | Maximum character count | "max_length:255" |
pattern:REGEX | Regex the value must match | "pattern:^[a-z]+$" |
Numeric validations
| Validation | Description | Example |
|---|---|---|
min:N | Minimum value (inclusive) | "min:0" |
max:N | Maximum value (inclusive) | "max:100" |
Examples
Join key attributes
Primitive attributes can be marked as join keys using theis_join_key property:

