This article will help you:
|
The Schema contains the definition of the events, event properties, and event properties’ values collected by Amplitude. Use it to categorize and describe your event data, as well as automate the QA process for newly-ingested data by surfacing or blocking unintended or malformed data. You can even use Schema as an allowed-list of the event data you want Amplitude to collect.
Note: Only customers who have purchased the Govern PLE (fka Taxonomy) can initialize and plan the Schema.
Amplitude will collect and ingest event data that conforms to the Schema you've created, while violations to the Schema trigger notifications and will appear in the Schema violations view. This helps automate much of the data validation process when implementing new events or properties, and can alert you to corrupted or malformed event data.
NOTE: The first time you open the Schema, you will have to initialize it before you can begin configuring it. Simply click the Initialize Schema button to do this. You also won't be able to plan events and properties before initializing your Schema.
You can reach the Schema from the Advanced tab.
Configure settings to handle Schema violations
Currently, you can configure your settings for three different types of Schema violations.
Unplanned event types
Sometimes, Amplitude may receive an event that is not part of your Schema, or that you did not previously plan. This is an unplanned event. You can configure Amplitude to respond to these in any of the following ways:
- Accept the event and its properties and automatically add it your Schema. No warnings or violations will be triggered. All events, properties and values will be collected with this setting.
- Trigger a warning and hide the event. Amplitude will set the event's status as unexpected, its visibility to hidden, and its activity status to inactive. You can then choose to approve the event and add it to your Schema, or reject it and prevent Amplitude from collecting it in the future.
- Reject the event and trigger a warning. Amplitude will not ingest the event. Any event data that is not ingested is not available in the future.
Unplanned event properties
When Amplitude encounters an event property that is not part of your Schema, or that you did not previously plan, it considers the property to be an unplanned event property.You can configure Amplitude to respond to these in any of the following ways:
- Accept the property and automatically add it your Schema. No warnings or violations will be triggered. All events, properties and values will be collected with this setting.
- Trigger a warning. Amplitude will set the property's status to unexpected and flag it in the Schema. You can then choose to approve it and add it to your Schema, or reject it and prevent Amplitude from collecting it in the future.
- Reject the property and trigger a warning. Amplitude will ingest the event, but not the event property. Any event data that is not ingested is not available in the future.
Unplanned event property values
When Amplitude receives an event property value that is not part of your Schema, or that you did not previously plan, it considers the value an unplanned property value. For example, an event property value is sent as a string, but your Schema expected a number. You can configure Amplitude to respond to an unplanned property value in any of the following ways:
- Accept the property. No warnings or violations will be triggered.
- Trigger a warning. Amplitude will show a warning that an unexpected event property value was collected.
- Reject the property and trigger a warning. Amplitude will ingest the event, but not the event property. Any event data that is not ingested is not available in the future.
If Amplitude is rejecting your event data and you want to begin collecting it, add the events or properties to your Schema by planning a new event or planning a new property.
View validation errors
Once you have initialized your Schema and defined your events and event properties, your Schema can be used to validate live data coming into Amplitude.
If your Schema is configured to hide unexpected events or properties and trigger a warning, Amplitude will log an error in the validation errors panel.
However, if your Schema specifies that Amplitude should reject any unexpected events or properties, that is exactly what will happen. Those events or properties will not be listed under validation errors, because there was no error: the unexpected data was rejected. Amplitude drops that data completely, and it is not recoverable.
You can set up email alerts for validation errors by clicking Subscribe.