Dataphin tags use expressions to define calculation rules that produce tag values from offline and real-time results. This topic describes how to create expression-based real-time tags.
Prerequisites
You have created the required real-time view. Create and Configure Real-Time Views.
Procedure
-
In the top menu bar, choose Tag > Tag Workbench.
-
In the left-side navigation pane, choose Tag Processing > Realtime Tag.
-
On the Real-Time Tag page, click the In-Project Tag tab, then click Add Tag.
-
In the Add Real-Time Tag dialog box, select Expression-Based Tag.
-
On the Add Expression Creation page, configure the Business Attributes and Technical Attributes.
-
Business Attributes
Parameter
Description
Tag Name
The tag name. Supports Chinese characters, letters, digits, and underscores (_). Maximum: 64 characters.
Entity-Entity ID
Select the entity and entity ID for real-time tag processing.
Tag Type
The processing method for the tag. Available types:
-
Attribute Tag: Describes objective entity facts, such as gender or name.
-
Statistical Tag: Aggregates entity behavior or attributes, such as the purchase amount in the last 7 days.
-
Predictive Tag: Predicts entity characteristics using algorithm models, such as a user's permanent province.
-
Composite Tag: Combines multiple tags using rules, such as consumer segmentation tags.
Timeliness
The update frequency of the tag:
-
Static Tag: Represents inherent entity characteristics that do not change, such as gender or name.
-
Dynamic Tag: Updated regularly to reflect changes, such as the order amount in the last 7 days.
Tag Description
A brief description of the tag. Maximum: 1,000 characters.
-
-
Technical Attributes
Parameter
Description
Tag Code
A globally unique identifier for the tag. Must start with a letter and can contain lowercase letters, digits, and underscores (_). Maximum: 64 characters.
Tag Update Method
Fixed to real-time update method. Cannot be changed.
Tag Owner
The owner of the tag.
-
-
On the Add Rule Combination page (step 2), configure the Processing Logic.
Parameter
Description
Version Number
The version number. Supports letters, digits, underscores (_), hyphens (-), and periods (.). Maximum: 64 characters.
Value Type
The value type. Defaults to String and cannot be changed.
Tag Configuration
Click
to reference existing tags in the expression.Syntax Reference:
-
Arithmetic: +, -, *, /
-
Logical: && (and), || (or), ! (not)
-
Relational: >, <, >=, <=, ==, !=
-
-
Click Submit.
After creation, publish the tag to make it available.
-
In the real-time tag list, click
in the operation column. -
In the Publish Tag dialog box, select the tag version to publish.
NoteYou can click View Version Comparison to review differences between versions before publishing.
-
Click Confirm.
-
What to do next
After publishing, list the tag in the tag market for management and further development. Manage Tags.