Behavior relationships define the connections between entities through specific actions. For example, user purchases product describes the relationship between the user entity and the product entity through the action of purchase. Defined behavior relationships can be used to develop behavior statistics, behavior preferences, and rule combination types of tags, or directly for audience group selection. This topic will guide you on how to add behavior relationships.
Prerequisites
Entities for binding behavior relationships must be created first. For more information, see Create entity.
Create behavior relationships
In the top menu bar on the Dataphin home page, select Tag > Tag Workbench.
In the top menu bar, select Project.
In the left-side navigation pane, select Data Preparation > Behavior Relationship.
On the Behavior Relationship page, click Add Behavior Relationship.
Follow the configuration wizard to configure the Basic Information, Processing Logic, and Operations Configuration of the behavior relationship.
Basic Information
Parameter
Description
Owner
Select the owner of the behavior relationship.
Description
Provide a brief description of the behavior relationship, within 1000 characters.
Processing Logic
Data Source
Select the source table for configuring the behavior relationship based on the project.
Parameter
Description
Project/data Segment
Select the Project or Data Version required for referencing the offline dataset. The dropdown list includes all projects (bound to offline computing sources) and data segments under the current tenant.
NoteIf Intelligent R&D edition is not purchased, only Project can be selected.
Logical Table/Source Table
Select the logical table/source table for defining the dataset.
Logical Table: If Data Segment is selected in Project/Data Segment, the source table can be selected. Only logical tables with read-through permission can be selected in the logical table.
When selecting a logical table, first choose the Logical Table Type, then select the Subject Area, and finally choose the target Logical Table from all logical tables within the subject area. Both subject area and logical table support keyword search. Logical table types include Logical Fact Table, Logical Dimension Table, and Logical Aggregate Table.
NoteThe default output method of the logical table does not include associations.
Source Table: If Project is selected in Project/Data Segment, the source table can be selected. Only tables with query table data permission for the project tenant account can be selected in the source table. If there is no permission, you can click Request Permission to apply.
Date Partition
Select the partition field of the source table.
If the selected source table is a partitioned table, the system will use the field name as the date partition by default. If the default field name is not in the partition field list of the source table, the system will use the first partition field of the table as the date partition.
If the selected source table is a non-partitioned table, there is no need to select a date partition.
Partition Field Format
Enter the date format or select an existing date format. You can choose yyyyMMdd, yyyy-MM-dd, yyyy/MM/dd, yyyy.MM.dd.
NoteOnly when the compute engine is MaxCompute, the partition field format can be selected as yyyymmdd, yyyy-mm-dd, yyyy/mm/dd, or yyyy.mm.dd.
NoteIf you need sample references for parameters, you can click Expand Sample Structure to view the reference sample information provided by Dataphin.
Behavior Subject
The behavior subject originates from the entities defined in the Planning module, used to describe the subject performing a certain behavior, usually a person, such as consumer, seller. The subject attribute is defined through the source table field to describe the subject, such as consumer age group, consumer gender, etc., as behavior tags, audience group selection filter conditions.
Parameter
Description
Behavior Subject
Subject
Select the entity created in the tag architecture. For example, member.
Subject ID
Select the subject ID bound to the subject. For example, member ID.
Column Name
Select the field name in the source table that describes the behavior subject. For example, the member_id field in the source table.
Field Type
Display the field type of the selected field name. For example, String.
Value Type
Display the value type of the selected field name. For example, string.
Description
Provide a brief description of the subject, within 1000 characters.
Subject Attribute
Attribute Name
Provide the attribute name of the subject. Allows Chinese, English, numbers, underscores (_), or hyphens (-), within 64 characters.
Attribute Code
Provide the attribute code of the attribute, which is the unique identifier of the attribute. When there are multiple attribute names, it can be used to identify the unique definition of the attribute.
Column Name
Select the field name in the source table that describes the behavior subject attribute. For example, the birthday field in the source table.
Field Type
Display the field type of the selected field name. For example, String.
Value Type
Display the value type of the selected field name. For example, string.
Configure Code Value
When the value of the attribute is recorded as a code, you can configure the corresponding interpretation for the attribute by configuring the code value. Only integer, Decimal(M,0), Boolean, and string type fields support configuring lookup tables.
Click
to enter the Configure Lookup Table dialog box.
In the Configure Lookup Table dialog box, configure the relevant parameters.
Configure Lookup Table: By default, it is not configured. You can select Reference Tables to configure the corresponding lookup table for the indicator.
Lookup Table Source: Currently, only Manual Configuration is supported.
Lookup Table Name: Enter the name of the lookup table. Supports Chinese, English, numbers, and special characters, within 128 characters.
Lookup Table Description: Enter a brief description of the lookup table, within 1000 characters.
Code Information: Supports single input and batch input, up to 500 groups.
Single Input: Click Add Code Value, enter the Code Value and Code Name, both must not be empty and must be unique. Additionally, the type of the code value needs to match the value type of the indicator. You can click
to delete the current row.
Batch Input: Click Batch Input, and in the Batch Input Code Information dialog box, batch input code values and code names, each group is separated by a line, and the code value and code name are separated by a colon (:). Click Click To Identify, and the system will automatically parse the code information in the batch input box and fill it into the code information list.
One-click Purge: Click One-click Purge, and the system will automatically clear the information list.
Click Confirm to complete the code value configuration.
NoteWhen batch inputting code information, if there are duplicate code values or code names, after clicking confirm, the system will automatically locate the first error row.
Description
Provide a brief description of the subject attribute, within 1000 characters.
NoteIf there is no field in the source table that describes the subject attribute, the subject attribute does not need to be configured.
Select the subject and subject ID, field name, and other information you need to define in the behavior subject. The system will automatically parse the field type and value type based on the configuration. You can also provide relevant description information for the subject. For creating a subject, see Create entity.
NoteClick Add Subject Attribute to add multiple corresponding attribute information for the subject, including attribute name, attribute code, field name, etc.
Behavior
In the behavior settings area, you need to fill in your behavior name and corresponding attribute information, including attribute name, attribute code, field name, etc. If you need to add multiple attribute information, you can click +add Behavior Attribute.
Parameter
Description
Behavior Name
Provide the behavior name of the subject. Allows Chinese, English, numbers, underscores (_), or hyphens (-), with a length not exceeding 64 characters.
Behavior Attribute
Attribute Name
The Behavior Time attribute of the behavior is a required field and cannot be modified.
Attribute names allow Chinese, English, numbers, underscores (_), or hyphens (-), with a length not exceeding 64 characters.
Attribute Code
Provide the attribute code of the attribute, which is the unique identifier of the attribute. When there are multiple attribute names, it can be used to identify the unique definition of the attribute.
Column Name
Select the field name in the source table that describes the behavior attribute. For example, the time field in the source table.
NoteFor non-E-MapReduce 5.x, AsiaInfo DP 5.3 Hadoop, and AnalyticDB for PostgreSQL compute engines, the field name of the Behavior Time attribute supports selecting fields of data types such as date, datetime, string, char, varchar, int, bigint, double, decimal. For non-timestamp field types, the system will automatically perform format conversion based on the field's data type and the selected date format.
For non-E-MapReduce 5.x, AsiaInfo DP 5.3 Hadoop, and AnalyticDB for PostgreSQL compute engines, the field name of the behavior time attribute supports selecting partition fields.
Field Type
Display the field type of the selected field name. For example, date.
Value Type
Display the field type of the selected field name. For example, datetime.
Configure Code Value
When the value of the attribute is recorded as a code, you can configure the corresponding interpretation for the attribute by configuring the code value. Only integer, Decimal(M,0), Boolean, and string type fields support configuring lookup tables.
Click
to enter the Configure Lookup Table dialog box.
In the Configure Lookup Table dialog box, configure the relevant parameters.
Configure Lookup Table: By default, it is Not Configured. You can select Reference Tables to configure the corresponding lookup table for the indicator.
Lookup Table Source: Currently, only Manual Configuration is supported.
Lookup Table Name: Enter the name of the lookup table. Supports Chinese, English, numbers, and special characters, with a length not exceeding 128 characters.
Lookup Table Description: Enter a brief description of the lookup table, within 1000 characters.
Code Information: Supports single input and batch input, up to 500 groups.
Single Input: Click Add Code Value, enter the Code Value and Code Name, both must not be empty and must be unique. Additionally, the type of the code value needs to match the value type of the indicator. You can click
to delete the current row.
Batch Input: Click Batch Input, and in the Batch Input Code Information dialog box, batch input code values and code names, each group is separated by a line, and the code value and code name are separated by a colon (:). Click Click To Identify, and the system will automatically parse the code information in the batch input box and fill it into the code information list.
One-click Purge: Click One-click Purge, and the system will automatically clear the information list.
Click Confirm to complete the code value configuration.
NoteWhen batch inputting code information, if there are duplicate code values or code names, after clicking confirm, the system will automatically locate the first error row.
Description
Provide a brief description of the behavior attribute, within 1000 characters.
Behavior Object (Optional)
The behavior object represents the object of the behavior, usually a thing, such as product, webpage, etc. It can be bound to existing platform entities. When not binding to an entity, the object name or ID serves as its unique identifier.
Parameter
Description
Is Binding Entity
When the behavior object binds to an entity, the object can select platform entities.
Object ID
When the behavior object binds to an entity, you need to select the object ID of the platform entity, which is the object of the behavior.
Object Unique Identifier
When not binding to an entity, you need to specify the object's unique identifier. It is recommended to set it as the object ID. Here, the ID and name are only used as identifiers, not as object attributes. If you need to treat them as object attributes, please add them again in the object attribute section.
Object Attribute
Provide the Attribute Name, Attribute Code, Field Name, and Description information of the object.
If you need to add multiple attribute information, you can click Add Object Attribute.
Operations Configuration
NoteBefore performing Operations Configuration, you can click Data Preview to view the data and confirm whether the configuration is correct.
Scheduling Cycle
Planned Update Time: Supports scheduling at a specific time of the day. The task automatically runs once a day. You can specify the running time point as needed.
Scheduling Run Plan: Click Preview. The scheduling run plan displays all scheduling instances and their scheduling types for each day of a specific month according to the configured scheduling cycle and conditional scheduling. The preview date type can be selected according to data timestamp or run date (scheduling date).
If there are multiple scheduling type statuses for all instances in one day, the scheduling type statuses contained are displayed by color, and the name and number of instances corresponding to each scheduling type status are displayed. For example, the figure below shows that on the 4th of a certain month, the current scheduling task has 44 normal scheduling instances, 2 paused instances, and 12 dry-run instances.
Hover the mouse over the scheduling type module of a certain day to view the detailed scheduling instance list of the current scheduling task on that day, including scheduling type, scheduling conditions, and condition names.
Conditional Scheduling: Multiple scheduling conditions can be set. The system evaluates the conditions in order from top to bottom. Once a condition is hit, the corresponding scheduling is executed, and the evaluation of all subsequent scheduling conditions is terminated. If no condition is hit, the default scheduling configuration is executed. For more information, see Conditional scheduling rule description.
ImportantConditional scheduling is only effective when the scheduling type is normal scheduling.
Scheduling Dependency
Scheduling dependency refers to the upstream and downstream dependency relationships between nodes. In Dataphin, only when the upstream task node runs successfully, the downstream task node will start running.
Automatic Parsing
The system will automatically parse the upstream dependency nodes based on task lineage and make associations. Data updates will depend on the output of upstream data.
NoteIf the result of automatic parsing does not meet expectations, you can click
to close the effective button. After closing, it means not selecting to depend on the node.
Default dependency on this cycle.
Add Dependency
If Automatic Parsing cannot parse the scheduling dependency relationship or the upstream dependency configuration generated by Automatic Parsing does not match the actual application, you can manually add the upstream dependency of the node.
Click Add Dependency, select to add Physical Node or Logical Table Node, and in the pop-up dialog box, select one or more target physical or logical table nodes, then click Confirm.
NoteIf Intelligent R&D edition is not purchased, only Physical Node dependencies can be added.
After manually adding dependencies, click automatic parsing again. If the generated parsing nodes are consistent with the manually added dependency nodes, the system will automatically perform an overwrite operation.
Edit Dependency
In the scheduling dependency list, click the Actions column of the target upstream dependency table
icon. In the pop-up dialog box, you can modify the Dependency Cycle, Dependency Policy, and Dependency Field (only logical table nodes support modification). For dependency configuration and description, see Configure offline task scheduling dependency, Scheduling dependency scene rules and examples.
Click the Actions column of the target upstream dependency table
icon to delete the corresponding dependency node.
After confirming that the configuration is correct, click Publish to complete the creation and configuration of the behavior relationship.
Manage behavior relationships
The behavior relationship page displays a list of behavior relationships, including behavior relationship name, behavior subject, behavior, owner, last modified time, status, and other information.
(Optional) You can filter the target behavior relationship by selecting behavior subject, owner, status, or entering the behavior relationship name.
In the behavior relationship list, you can perform the following operations on the behavior relationship.
Operation Item
Description
Copy
Copy the current behavior relationship information to create a new behavior relationship.
Edit
You can edit the editable information of the current dataset, including Basic Information, Processing Logic, Operations Configuration.
NoteIf the source table of the behavior relationship prompts Table structure information not obtained, please check whether the source table has been deleted or the table name has been changed.
Unpublish
You can view the configuration details of the current behavior relationship.
Details
Unpublish the published behavior relationship.
Delete
Support deleting editing, publish failed, and unpublished behavior relationships.
What to do next
After completing the configuration of the behavior relationship, you can process offline tags through the behavior relationship. For specific operations, see Offline tags.