Some examples of data that are compliant and non-compliant to the Integer schema:
- 42
- -1
- 1.0
- 3.1415926
- "52"
Some examples of data that are compliant and non-compliant to the Number schema:
- 40
- 50
- "41"
- 24
- 100
Objects
You can use JSON objects to map specific keys to values.
While using the Data Catalog API, you can use the rules object to specify the property mappings for the event to be upserted in the tracking plan. A sample rules object is shown:
Some examples of data that are compliant and non-compliant to the Null schema shown above:
- null
- false
- 0
- ""
Multi data types
RudderStack also supports specifying multi data types for the event properties along with the above data types.
A sample schema definition for multi data types:
{"type":["string","integer","boolean","null"]}
Some examples of data that are compliant and non-compliant to the above schema:
- "Hello"
- 12
- true
- null
- 3.1415926
- [1,2,3,4,5]
Metadata
You can use the metadata parameter to provide generic keywords such as annotations and comments to provide additional context and meaning to your JSON schema.
RudderStack supports the below generic keywords:
Keyword
Description
$id
Unique identifier for the schema resource.
$schema
JSON schema dialect identifier.
title
String for the title of the data.
description
String describing the data’s purpose.
default
String specifying a default value
examples
An array of examples that validate against the schema.
$comment
String for the user-defined comments added to the schema.
readOnly
Boolean indicating that the value is read-only and should not be modified.
writeOnly
Boolean indicating that a value may be set but will remain hidden.
deprecated
Boolean indicating that instance value the keyword applies to may be deprecated in the future.
Restricted keyword structures
Apart from the data type-specific keywords, RudderStack also restricts usage of the following keyword structures:
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.