Attribute Data Types Reference

On This Page

Overview

All data objects in the platform have attributes, which provide information (metadata) about the objects. See Objects Attributes. The platform supports the following attribute data types

API-Specific Attribute Types
Some APIs, such as Spark DataFrames and Frames, require support for interface-specific data types and related type conversions to and from platform data types. Information about API-specific attribute data-types support is provided in the relevant API references. See, for example, the Spark DataFrames and Frames data-types references.
Boolean
A Boolean value — true or false.
Blob

A Base64-encoded binary large object (blob).
In the web APIs, a blob attribute is represented as a string.

Note
The web APIs also support array blob attributes. See Array Attributes.
Number

One of the following numeric types:

  • Integer. For example, 0, 16, -5.

  • Floating point — a base-10 (b) 64-bit-encoded floating-point number format. The platform supports a 16-digit precision (p), but numbers with more than 14 significant digits may incur a bias. The exponent (e) values can be between -308 (Emin and +308 (Emax The following examples demonstrate the supported non-bias precision and exponent limits: 12345.678901234, -12345.678901234, 1.2345678901234e-308, 1.2345678901234e+308.

    For more information about floating points, refer to the IEEE 754: Standard for Binary Floating-Point Arithmetic and the related Wikipedia page.

Note
In some contexts, numeric attribute values are represented as strings, such as in the NoSQL Web API Attribute Value objects. Note that string floating numbers are not identical to true floating-point numbers. For example, "1" and "1.00" are not considered identical. Therefore, consider carefully how you define your floating-point number strings, and avoid comparisons of number strings. Before performing any comparisons or calculations, convert floating-point strings into actual floating-point numbers.
String
A Unicode string with UTF-8 binary encoding.

Array Attributes

The platform's web APIs support array attributes. An array attribute is a special type of blob attribute that the platform identifies as a Base64 encoded array. The current release supports numeric array attributes of type integer and double. In the web APIs, an array attribute, like all blob attributes, is represented as a Base64 encoded string.

Array attributes are defined in SET update expressions and can be referenced in update expressions using the array operator ([ ]). For more information, see Array-Attribute Expression Variables.

See Also