1. Data strong validation mode specific errors and handling methods

Data reporting scenariosReporting processIs metadata unable to be createdDoes the code return an errorDoes the buried point data query report an errorIs the data discardedCan discarded data be recovered
Corresponding event name or attribute name in the original event, and the reported data conforms to the SenseData format
  • Buried point data query shows no error, as follows:

NoNoNo//
Event not created, data reported for non-existent event in original event
  • Code received error from service: Can not create undefined event: 'xxxx' with normal token

  • Buried data query error:

/YesYesWhole data is discardedYes
Created a custom event with $ character in metadata and reported data

If the event name with $ character is not set before enabling strong verification, an error will occur when creating the event

Yes////

If the event name with $ character has been set before enabling strong verification

  • Keep the event name with $ character that has been created in the metadata

  • Events with $ character that have been successfully created can report data normally

NoNoNo//
The attribute name created in the metadata contains reserved fields for Sensors Analytics and reports data
  • Error occurred when creating an attribute (device_id, user_group beginning Except for user_tag

  • The SDK also performs validation when reporting data, and an error occurs: property key must be a valid variable name

YesYesNo//
The event name created in the metadata is illegal and illegal event name data is reported
  • Error occurred when creating an event

  • SDK data reporting is also verified and the error message is: event name must be a valid variable name

YesYesNo//
Create an event with the same name as the virtual event and report data

  • Error in creating event: DUPLICATED_NAME, duplicate naming

  • Code receives error from service: Can't import virtual event, event_name: xxx

  • Error in query tracking data

YesYesYesThe entire data is discardedYes
The case case of the created attribute name is inconsistent with that of the existing attribute name in the meta event, and the data is reported

  • Error creating property: This property name is already in use, please rename it

  • The code receives an error from the service:{"type":"UNDEFINED_PROPERTY","reason":"Won't create undefined properties: {xxxxx}"}

  • Error in query tracking data: In the incoming data, there is an event/user attribute that is not defined by "metadata - meta event". The undefined event/user attribute is not stored in the library, but other defined attributes of the current data are normally stored in the library. If you need to add attributes, go to Metadata - Meta Events and add them before uploading them

YesYesYesThe error attribute is not stored. Other data is stored normallyNo
The reported data contains an attribute name that does not exist in the meta event
  • The code receives an error return from the service:Won't create undefined properties:{"xxx":"xxx"}

  • Query tracking data will report errors:In the incoming data, there are event/user attributes not defined by "metadata-Metevent". The undefined event/user attributes are not stored in the library, but other defined attributes of the current data are normally stored in the library. If you need to add attributes, go to Metadata - Meta Events and add them before uploading them

/YesYesError attributes are not stored, other data is stored normallyNo
The attribute in the reported data is inconsistent with the existing attribute type in the meta-event

The type conversion is successful and stored normally (e.g., number converted to string type)

/NoNo//

The type conversion fails (e.g., string converted to list), and the previous property has data:

  • The code receives an error returned by the service:

PROPERTY_WITH_WRONG_TYPE, data type error, it was previously defined as xxx, but this time the value passed is...

  • Query Tracking data will throw an error

/YesYesDefault intercepts the entire data. It can be modified to only intercept attributesNo

Failed type conversion (e.g. string to list), and the property has not reported data before:

  • Code receives error message returned by the service:

Data type not match with pre defined properties

  • Error occurs in query tracking data

/YesYesError attribute is not stored, other data is normally storedNo
The length of reported data attribute exceeds the limit

The length of string type exceeds the limit

  • If it exceeds the limit of Python SDK (the limit of the SDK is 8192, excluding 8192), an error is reported: the max length of property key is 8192

/YesNo//

String type exceeds the length limit

  • Exceeded the limit of SDK (non-Python SDK) itself, no error is reported, and the data is truncated
  • Not exceeding the limit of SDK, but exceeds the 1024-byte limit set by Sensors Data backend
/NoNoTruncated the bytes exceeding the length limit (truncated exceeding 1024 bytes) and normally stored in database/

Number type exceeds the limit (number attribute exceeds the length limit or has more than 3 decimal places)

  • SDK error: number property 'xx' value 'xxxx' overflow

  • Error in query tracking data

/YesYesError attributes are not stored in the database, other data can be stored normallyNo
Custom properties created in the metadata with the character $ are reported
  • Error in creating property: 100 characters: only letters, numbers, and underscores are supported by default, other characters are not supported

  • SDK Error: invalid preset properties

  • Event Data Query Error

YesYesYesError attributes not stored, other data stored as normalNo
Create attribute name in metadata is invalid and report invalid attribute name data
  • Create attribute error: 100 characters: only letters, numbers, and underscores are supported by default, other characters are not supported

  • Data cannot be reported, SDK Error: property key must be a valid variable name

Yes////
Newly added preset attributes by the SDK, but the version of Sensdata analysis is relatively oldSame as "Create custom attributes in metadata with $ character and report data"/yesyesError attributes do not enter the database, other data are normally enteredno
Create an attribute name with the same name as the virtual attribute and report data
  • When creating an attribute, an error occurs: DUPLICATED_NAME, naming duplicate

  • Code receives error returned by the service: "Won't create undefined properties"

  • Burying point data query error

yesyesyesError attributes do not enter the database, other data are normally enteredno
Create an attribute name with the prefix user_tag or user_group and report data

nononoAttributes with the user_tag or user_group prefix are discarded, and other data is stored normallyno
Data verification for normal_token or super_token is configured.

Metadata creation is not affected

Reference document:https://manual.sensorsdata.cn/sa/latest/数据导入常见问题-47677442.html#id-.数据导入常见问题v2.3-判断数据Token类型

Error scenario:

  1. If super_token is set and normal_token is set, the imported data token is empty or inconsistent with the set token (super_token /normal_token), the imported data is marked as invalid
  • SDK Report error:

{"type":"INVALID_IMPORT_TOKEN","reason":"Invalid import token "}

  • Error in query tracking data: Invalid import token

2. If the super_token is set, but the imported data token is empty or inconsistent with the set super_token, and the meta event that does not exist in the metadata is reported

  • SDK Error: {"type":"UNDEFINED_EVENT","reason":"Can not create undefined event: 'xyz11123' with normal token"}

  • Buried Data Query Error:

NoYesYesThe entire data is discardedYes

If the super_token is set, but the imported data token is empty or inconsistent with the set super_token, and an event/user attribute that does not exist in the reported metadata is reported

  • SDK error: {"type":"UNDEFINED_PROPERTY","reason":"Won't create undefined properties: {xxxxx}"}

  • Buried Data Query Error: Won't create undefined properties: {xxxxx}

NoYesYesIncorrect attribute is not stored, other data is stored normallyNo

2. Detailed error and handling method in free reporting mode

Data reporting scenarioScreenshotDoes the code return an errorIs there an error in the buried data queryIs the data discardedCan the discarded data be retrieved
In the reporting data, the data that meets the Sensors Data format

Normal reporting data, the buried data query shows no errors, and the no error display is as follows:

NoNo//
In the reporting data, custom events in raw data added the $ character

Normal reporting data

NoNo//
In the reporting data, the property name in the raw data contains the reserved fields of Sensors

Data cannot be reported: The property 'xx' is invalid

YesNo//
The event name in the original data reported is invalid.

The data cannot be reported: The Event Name 'xx' is invalid

YesNo//
The original data reported contains sub-events that do not exist in the parent event.Normal Data ReportingNoNo//
The original data in the reporting data includes event names that are the same as virtual events
  • The code received an error from the service: Can't import virtual event, event_name:xxx

  • Error in query tracking data

YesYesThe entire data is discardedYes
The property name in the original data in the reporting data is inconsistent with the case of the existing property name in the original event
  • The code received an error from the service: Conflict with an existing property name that is different in case

  • Error in query tracking data: An existing property with the same name but different case as the property being created already exists, for example, if the 'abc' property exists, the 'abc' property cannot be created and used

YesYesThe entire data is discardedYes
In the reported data, the original data contains attribute names that do not exist in the meta eventNormal reported dataNoNo//
In the reported data, the data types of attributes in the original data are inconsistent with those in the meta eventThe type conversion is successful, and the data is reported normally (such as converting number to string type)NoNo//

The type conversion fails (such as converting string to list)

  • The code receives an error message returned from the service: Data type error, it was previously identified as 'List' type, but this time the value passed is

  • The event management will report an error: attribute (properties) type error

YesYesThe whole data is discardedYes
In the reported data, the length of the attribute in the original data exceeds the limit

The length of the string type exceeds the limit

  • If it exceeds the limit of the SDK itself, an error will be reported (the SDK limit is 8192, not including 8192): the max length of property key is 8192

Yesno//

The length of the string type exceeds the limit

  • It does not exceed the SDK limit, but exceeds the 1024 bytes preset by the backend of Sensors Analytics
nonoTruncate the overflow byte length and other data is normally stored in the database/

The number type exceeds the limit: number property 'xx' value 'xxx' overflow

  • SDK error:

  • Error in query tracking data

YesYesError attributes not stored, other data can be stored normallyNo
In the reported data, the custom attributes in the raw data added the $ character
  • SDK error: invalid properties

  • Event data query error

YesYesIncorrect attributes will not be stored in the database, other data can be stored normallyNo
Report data with illegal attribute names

Data cannot be reported

  • SDK error: property key must be a valid variable name

YesNo

SDK newly added preset attributes, but the version of Sensors Analytics is relatively oldSame as "Creating custom attributes in the metadata added $ characters and reported data"YesYesNew preset attributes are not stored, other data is normalNo
The reported data contains event attributes with the same name as the virtual attributes

NoNoClear the data of the virtual attribute/
In the reported data, the attribute name uses the prefix user_tag or user_group

NoNoAttributes with the prefix user_tag or user_group are discarded, other data is stored normallyNo
Data validation with normal_token or super_token

Reference document:https://manual.sensorsdata.cn/sa/latest/数据导入常见问题-47677442.html#id-.数据导入常见问题v2.3-判断数据Token类型

Error scenario:

  1. If super_token is set and normal_token is set, the imported data token is empty or inconsistent with the set token (super_token /normal_token), the imported data is marked as invalid
  • SDK Report error:

{"type":"INVALID_IMPORT_TOKEN","reason":"Invalid import token "}

  • Error in query tracking data:Invalid import token

2. If super_token is set, but the imported data token is empty or inconsistent with the set super_token, and a meta event that does not exist in the metadata is reported

  • SDK Reporting Error: {"type":"UNDEFINED_EVENT","reason":"Can not create undefined event: 'xyz11123' with normal token"}

  • Error in query tracking data:

YesYesThe whole data is abandonedYes

If super_token is set, but the imported data token is empty or inconsistent with the super_token, and events/user properties that do not exist in the reported metadata are reported

  • SDK report error: {"type":"UNDEFINED_PROPERTY","reason":"Won't create undefined properties: {xxxxx}"}

  • Error in query tracking data:Won't create undefined properties: {xxxxx}

YesYesError attribute is not stored, other data can be stored normallyNo