Supported Data Types

This reference contains the supported data types in SlicingDice, their limitations and restrictions.


String

A string column stores text values, with one or more characters. It's possible to store a single value or multiple values in the same column for an entity.

Use string columns for text values that don't need to be unique. For example: name, product name, URL, city, state, country, hobbies, credit card label, car model, store name, manufacturer and so on.

String column limitations and restrictions

  • String values can have at most 1,000 characters
  • Cannot insert empty strings, such as ""
  • String values are always stored in lowercase only

Integer

A integer column stores integer number values, without any decimal places, such as 3, 10, -1 or 123642. It's possible to store a single value or multiple values in the same column for an entity. Use integer columns to store data such as: age, number of children, number of visitors, and so on

Integer column limitations and restrictions

  • Integer values must be in the interval from -9,223,372,036,854,775,808(-2⁶³) to 9,223,372,036,854,775,807 (2⁶³ - 1)
  • Integer values cannot have decimal places
  • Cannot insert empty values, such as ""

Decimal

A decimal column stores decimal number values with fixed precision, such as .01, -10.457 or 40154.4875. It is possible to store a single value or multiple values in the same column for an entity.

Use decimal columns for situations where decimal number are truly required, such as: price, piece weight, sensor reading, optimal temperature, water flow.

When creating a decimal column, you must define how many decimal-places will be used. For example, the value 7.03 requires 2 decimal places, whereas 1.48521 needs 5. This value must be defined with caution, given that it reduces the range of values a decimal column can store

Decimal column limitations and restrictions

  • Decimal values must be in the interval from (-263/10n) to ((263 - 1)/10n) given n decimal places
  • Decimal values can have at most 20 decimal places
  • Cannot insert empty values, such as ""

Boolean

A boolean column stores logic values, such as true or false. It is possible to store a single value or multiple values in the same column for an entity.

Use boolean columns when you are interested in whether the entity has a determined property or not, in cases such as: user's status (active or inactive), user's age confirmation (less than 18 years old or not), sensor activity (active or not) and so on.

Boolean column limitations and restrictions

There are no limitations nor restrictions for the boolean columns.


Date

A date column stores date values, without time information. Differently from event column's data - where both value and date are required to retrieve the complete information - a date column has complete meaning by itself. It is possible to store a single value or multiple values in the same column for an entity.

Use date columns for things such as birthdate, sign up date, tests starting date, product launch date and so on.

Date column limitations and restrictions

  • Date values must be in ISO 8601 format: YYYY-MM-DD

Datetime

A datetime column stores date values, with time information. Differently from event column's data - where both value and date are required to retrieve the complete information - a datetime column has complete meaning by itself. It is possible to store a single value or multiple values in the same column for an entity.

Use datetime columns for things such as creation datetime, sign up datetime, tests starting datetime and so on.

Datetime column limitations and restrictions

  • Date values must be in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

Unique ID

A unique-id column stores text data that are exclusive to one entity and will never show up in multiple entities. Differently from string column, unique-id columns cannot store a list of values.

Use the Unique ID column for cases which the nature of the data guarantees their uniqueness, such as: Social Security Number, email address, username, HTTP cookie, vehicle license plate, sensor ID number, serial number and so on.

When you create a database, SlicingDice database automatically creates a unique-id data type column called Entity ID (API name: entity-id) for that database. This column will be transparently used by the database to store the value of all the entities you send to the API. It's not possible to delete this column nor change the API name (entity-id), although you can rename the column name.

Unique ID column limitations and restrictions

  • Unique ID values can have at most 1,000 characters
  • Unique ID cannot store a list of values

Foreign-Key

A foreign-key column stores values, numeric or text, referring to other entities (rows) from a different dimension.

Foreign-key column limitations and restrictions

  • Foreign Key values can have at most 1,000 characters
  • Foreign Key cannot store a list of values
  • Foreign Key can only be created at a "Fact Table" type dimension

Geolocation

A geolocation column stores values related to geographic position (longitude and latitude), such as -23.625807,-46.702000. It is possible to store a single value or multiple values in the same column for an entity.

Use geolocation column for situations when a location is required to be stored, such as sensors location and store location.

Geolocation column limitations and restrictions

  • Geolocation values are stored in a list, separated with a comma, like the following: [longitude,latitude]
  • Geolocation values are decimal values, with up to 6 decimal places. If an integer is inserted, geolocation values will be converted into a decimal, filled with zeroes. If 7 or more decimal places are inserted, the column will ignore the additional decimal places
  • Cannot insert empty values, such as [,] and [-87.528796,]
  • The values limit restrictions for longitude range between [-180,180] and for latitude range between [-90,90]

String Event

A string-event column stores text values that are associated with a date/time. Differently from string attribute columns, string-event columns have different values throughout the time and you should use them only if tracking these changes is important, otherwise prefer a string column.

Examples of string-event usage include: browsed URLs, purchased products, completed shipments, login history, user searches, sensor status and so on.

The date component must follow the ISO 8601 format: YYYY-MM-DDThh:mm:ssTZ, for example: 2019-04-08T10:35:23Z. You can also use a date with milliseconds values, such as 2017-06-01T10:35:23.954Z , but they will be automatically discarded.

To configure a timezone, replace Z by +HH:MM or -HH:MM, for example 2019-04-08T10:35:23+03:00. Using Z is a shortcut to using UTC, such as in 2019-04-08T10:35:23Z. However, it is important to know that the database will always store and fetch data in UTC format.

You may omit the date parameter when inserting data, but the database will use the current UTC timestamp. On the other hand, defining date gives you more control on the date being stored.

String-event column limitations and restrictions

  • String event values can have at most 1,000 characters
  • String event date cannot be older than 1990-01-01
  • Cannot insert empty strings, such as ""
  • String event values are always stored in lowercase only

Integer Event

A integer-event column stores integer number values that are associated with a date/ time. Differently from integer attribute columns, integer-event columns have different values throughout the time and you should use them only if tracking these changes is important, otherwise prefer a integer column.

Examples of integer-event usage include: total purchase amount, tracking number of users at your store every 10 minutes, number of game plays per minute for every player, number of produced fruits per farm every day and so on.

The date component must follow the ISO 8601 format: YYYY-MM-DDThh:mm:ssTZ, for example: 2019-04-08T10:35:23Z. You can also use a date with milliseconds values, such as 2017-06-01T10:35:23.954Z , but they will be automatically discarded.

To configure a timezone, replace Z by +HH:MM or -HH:MM, for example 2019-04-08T10:35:23+03:00. Using Z is a shortcut to using UTC, such as in 2019-04-08T10:35:23Z. However, it is important to know that the database will always store and fetch data in UTC format.

You may omit the date parameter when inserting data, but the database will use the current UTC timestamp. On the other hand, defining date gives you more control on the date being stored.

Integer-event column limitations and restrictions

  • Integer event values must be in the interval from -9,223,372,036,854,775,808(-2⁶³) to 9,223,372,036,854,775,807 (2⁶³ - 1)
  • Integer event values cannot have decimal places
  • Integer event date cannot be older than 1990-01-01

Decimal Event

A decimal-event column stores decimal number values that are associated with a date/ time. Differently from decimal attribute columns, decdimal-event columns have different values throughout the time and you should use them only if tracking these changes is important, otherwise prefer a decimal column.

Examples of decimal-event usage include: tracking stock prices, sensor's temperature, product price change over time and so on.

When creating a decimal-event column, you must define how many decimal-places will be used. For instance, the value 7.03 requires 2 decimal places, whereas 1.48521 needs 5. This value must be defined with caution, given that it reduces the range of values a decimal column can store

The date component must follow the ISO 8601 format: YYYY-MM-DDThh:mm:ssTZ, for example: 2019-04-08T10:35:23Z. You can also use a date with milliseconds values, such as 2017-06-01T10:35:23.954Z , but they will be automatically discarded.

To configure a timezone, replace Z by +HH:MM or -HH:MM, for example 2019-04-08T10:35:23+03:00. Using Z is a shortcut to using UTC, such as in 2019-04-08T10:35:23Z. However, it is important to know that the database will always store and fetch data in UTC format.

You may omit the date parameter when inserting data, but the database will use the current UTC timestamp. On the other hand, defining date gives you more control on the date being stored.

Decimal-event column limitations and restrictions

  • Decimal event values must be in the interval from (-263/10n) to ((263 - 1)/10n) given n decimal places
  • Decimal event values can have at most 20 decimal places
  • Decimal event date cannot be older than 1990-01-01

Geolocation Event

A geolocation-event column stores values related to geographic position (longitude and latitude), such as -23.625807,-46.702000, that are associated with a date and time. Differently from geolocation attribute columns, geolocation-event columns have different values throughout the time and you should use them only if tracking these changes is important, otherwise prefer a geolocation column.

Examples of geolocation-event usage include: tracking devices in real time and storing GPS history.

The date component must follow the ISO 8601 format: YYYY-MM-DDThh:mm:ssTZ, for example: 2019-04-08T10:35:23Z. You can also use a date with milliseconds values, such as 2017-06-01T10:35:23.954Z , but they will be automatically discarded.

To configure a timezone, replace Z by +HH:MM or -HH:MM, for example 2019-04-08T10:35:23+03:00. Using Z is a shortcut to using UTC, such as in 2019-04-08T10:35:23Z. However, it is important to know that the database will always store and fetch data in UTC format.

You may omit the date parameter when inserting data, but the database will use the current UTC timestamp. On the other hand, defining date gives you more control on the date being stored.

Geolocation-event column limitations and restrictions

  • Geolocation event values are stored in a list, separated with a comma, like the following: [longitude,latitude]
  • Geolocation event values are decimal values, with up to 6 decimal places. If an integer is inserted, geolocation values will be converted into a decimal, filled with zeroes. If 7 or more decimal places are inserted, the column will ignore the additional decimal places
  • Cannot insert empty values, such as [,] and [-87.528796,]
  • Geolocation event date cannot be older than 1990-01-01
  • The values limit restrictions for longitude range between [-180,180] and for latitude range between [-90,90]