Create and manage behavioral relationships

更新时间:
复制 MD 格式

A behavioral relationship defines how entities interact through a specific behavior, such as a user purchasing a product. Use behavioral relationships to create tags for behavioral statistics, preferences, and rule-based combinations, or to segment users directly.

Prerequisites

Create the entities for the behavioral relationship before you begin.Create and manage entities.

Create a behavioral relationship

  1. In the top navigation bar of the Dataphin homepage, choose Tag > tag workbench.

  2. In the top navigation bar, choose Project.

  3. In the navigation pane on the left, choose Data Preparation > Behavioral Relationship.

  4. On the Behavioral Relationship page, click Create Behavioral Relationship.

  5. Use the configuration wizard to set the Basic Information, Processing Logic, and O&M Configuration for the behavioral relationship.

    • Basic Information

      Parameter

      Description

      Owner

      Select the owner of the behavioral relationship.

      Description

      Enter a brief description of the behavioral relationship (up to 1,000 characters).

    • Processing Logic

      • Data Source

        Select a source table from a project.

        Parameter

        Description

        Project/Data Segment

        Select the Project or Data Segment that contains the data for the offline dataset. The drop-down list includes all projects that have bound offline compute engines and all data segments under the current tenant.

        Note

        If you have not purchased the Intelligent R&D edition, you can only select a Project.

        Logical Table/Source Table

        Select the logical table or source table for your dataset.

        • Logical Table: This option is available if you select Data Segment. You can select only logical tables for which you have synchronous read permissions.

          Select a Logical Table Type, then a Subject Domain, and then the target Logical Table. Search by keyword if needed. Types: fact logical table, dimension logical table, and summary logical table.

          Note

          By default, the logical table output does not include associations.

        • Source Table: Available when you select Project. Only tables with production account read permissions can be selected. Click Apply for Permissions to request access.

          Note

          Currently, only partitioned tables are supported.

        Date Partition

        Select the partition field of the source table.

        For partitioned tables, the system uses a default field name as the date partition. If this name is absent from the partition fields, the first partition field is used.

        Partition Field Format

        Enter a date format or select an existing one. Available options are yyyyMMdd, yyyy-MM-dd, yyyy/MM/dd, and yyyy.MM.dd.

        Note

        The partition field format can be yyyyMMdd, yyyy-MM-dd, yyyy/MM/dd, or yyyy.MM.dd only when the compute engine is MaxCompute.

        Note

        To view a sample parameter structure, click Expand Sample Structure.

      • Behavioral Subject

        The behavioral subject is an entity from the Planning module that performs a behavior—typically a person such as a consumer or seller. Subject properties use source table fields (for example, age range or gender) as filter conditions for behavioral tags and user segmentation.

        Parameter

        Description

        Behavioral Subject

        Subject

        Select an entity created in the tag architecture. For example, Member.

        Subject ID

        Select the subject ID bound to the subject. For example, Member ID.

        Field Name

        Select the field from the source table that describes the behavioral subject. For example, the member_id field.

        Field Type

        Displays the data type of the selected field. For example, String.

        Value Type

        Displays the value type of the selected field. For example, String.

        Description

        Enter a brief description of the subject, up to 1,000 characters.

        Subject Property

        Property Name

        Enter a name for the subject property. The name can contain Chinese characters, letters, digits, underscores (_), and hyphens (-), up to 64 characters.

        Property Code

        Enter a unique code to distinguish properties that share the same name.

        Field Name

        Select the field from the source table that describes the subject property. For example, the birthday field.

        Field Type

        Displays the data type of the selected field. For example, String.

        Value Type

        Displays the value type of the selected field. For example, String.

        Configure Code Table

        If a property's value is a code, you can configure a code table to map the code to its meaning. Code tables are supported only for fields of the integer, Decimal(M,0), Boolean, and string types.

        1. Click the image.png icon to open the Configure Code Table dialog box.

        2. In the Configure Code Table dialog box, configure the following parameters.

          • Configure Code Table: By default, this is not configured. You can select Code Table to configure a code table for the property.

          • Code Table Source: Currently, only Manual Configuration is supported.

          • Code Table Name: Enter a name for the code table. The name can contain Chinese characters, letters, digits, and special characters, up to 128 characters.

          • Code Table Description: Enter a brief description of the code table, up to 1,000 characters.

          • Code Information: You can add up to 500 pairs of code information, either individually or in batches.

            • Single Input: Click Add Code Value and enter a Code Value and a Code Name. Both fields are required and must be unique. The data type of the code value must match the value type of the property. You can click the image.png icon to delete the current row.

            • Batch Input: Click Batch Input. In the Batch Input Code Information dialog box, you can enter code values and code names in batches. Separate each pair with a line break, and separate the code value and code name with a colon (:). After you click Parse, the system automatically parses the information from the input box and populates the code information list.

            • Clear All: Click Clear All to clear the information list.

        3. Click OK to save the code value configuration.

          Note

          If you enter duplicate code values or names during batch input, the system highlights the first invalid row after you click OK.

        Description

        Enter a brief description of the subject property, up to 1,000 characters.

        Note

        If the source table contains no fields that describe subject properties, you can skip this configuration.

        Select the subject, subject ID, field name, and description. The system detects field and value types automatically.Create and manage entities.

        Note

        Click Add Subject Property to add multiple properties for the subject, such as the property name, property code, and field name.

      • Behavior

        In the behavior settings area, enter a behavior name and configure its properties, such as the property name, property code, and field name. To add multiple properties, click +Add Behavioral Property.

        Parameter

        Description

        Behavior Name

        Enter the name of the behavior. The name can contain Chinese characters, letters, digits, underscores (_), and hyphens (-), up to 64 characters.

        Behavioral Property

        Property Name

        • The Behavior Time property is required and cannot be modified.

        • The property name can contain Chinese characters, letters, digits, underscores (_), and hyphens (-), up to 64 characters.

        Property Code

        Enter a unique code to distinguish properties that share the same name.

        Field Name

        Select the field from the source table that describes the behavioral property. For example, the time field.

        Note
        • For compute engines other than E-MapReduce 5.x, AsiaInfo DP 5.3 Hadoop, and AnalyticDB for PostgreSQL, the field name for the Behavior Time property can be a field of a data type such as date, datetime, string, char, varchar, int, bigint, double, or decimal. For non-timestamp field types, the system automatically performs format conversion based on the field's data type and the selected date format.

        • For compute engines other than E-MapReduce 5.x, AsiaInfo DP 5.3 Hadoop, and AnalyticDB for PostgreSQL, the field name for the Behavior Time property can be a partition field.

        Field Type

        Displays the data type of the selected field. For example, date.

        Value Type

        Displays the value type of the selected field. For example, DateTime.

        Configure Code Table

        If a property's value is a code, you can configure a code table to provide its corresponding meaning. Code tables are supported only for fields of the integer, Decimal(M,0), Boolean, and string types.

        1. Click the image.png icon to open the Configure Code Table dialog box.

        2. In the Configure Code Table dialog box, configure the following parameters.

          • Configure Code Table: By default, this is not configured. You can select Code Table to configure a code table for the property.

          • Code Table Source: Currently, only Manual Configuration is supported.

          • Code Table Name: Enter a name for the code table. The name can contain Chinese characters, letters, digits, and special characters, up to 128 characters.

          • Code Table Description: Enter a brief description of the code table, up to 1,000 characters.

          • Code Information: You can add code information individually or in batches. A maximum of 500 pairs is supported.

            • Single Input: Click Add Code Value and enter a Code Value and a Code Name. Both fields are required and must be unique. The data type of the code value must match the value type of the property. You can click the image.png icon to delete the current row.

            • Batch Input: Click Batch Input. In the Batch Input Code Information dialog box, you can enter code values and code names in batches. Separate each pair with a line break, and separate the code value and code name with a colon (:). After you click Parse, the system automatically parses the information from the input box and populates the code information list.

            • Clear All: Click Clear All to clear the information list.

        3. Click OK to save the code value configuration.

          Note

          If you enter duplicate code values or names during batch input, the system highlights the first invalid row after you click OK.

        Description

        Enter a brief description of the behavioral property, up to 1,000 characters.

      • Behavioral Object (Optional)

        A behavioral object is the target of a behavior—typically an object such as a product or webpage. Bind it to an existing entity, or use the object's name or ID as its unique identifier.

        Parameter

        Description

        Bind to an Entity

        Select a platform entity as the behavioral object.

        Object ID

        Select the object ID of the bound platform entity.

        Unique Object Identifier

        If not bound to an entity, specify a unique identifier (recommended: the object ID). The ID and name are identifiers only—to use them as properties, add them again in the object properties section.

        Object Property

        Enter the Property Name, Property Code, Field Name, and Description for the object property.

        To add multiple properties, click Add Object Property.

    • O&M Configuration

      Note

      Before proceeding with O&M Configuration, click Data Preview to verify your configuration.

      1. Scheduling Cycle

        • Scheduled Update Time: Schedule the task to run automatically once a day at a specific time.

        • Scheduling Plan: Click Preview. Based on the configured scheduling cycle and conditions, the scheduling plan displays all scheduled instances and their scheduling types for each day of a specific month. You can choose to preview the plan by business date or Running Date (Scheduling Date).

          If instances on a given day have multiple scheduling types, the plan uses different colors to represent all included types and shows the name of each type and the number of corresponding instances. For example, the following figure shows that on the 4th of a month, the task has 44 normally scheduled instances, 2 suspended instances, and 12 dry-run instances.image

          Hover over the scheduling type block for a specific day to view a detailed list of scheduled instances for that day, including the scheduling type, condition, and condition name.

        • Conditional Scheduling: Set multiple scheduling conditions. The system evaluates conditions top to bottom; when a condition is met, the corresponding scheduling type runs and evaluation stops. If no conditions are met, the default configuration applies.Conditional scheduling rules.

          Important

          Conditional scheduling takes effect only when the scheduling type is Normal Scheduling.

      2. Scheduling Dependencies

        Scheduling dependencies define upstream-downstream relationships between nodes. A downstream node runs only after all upstream nodes succeed.

        • Automatic Dependency Resolution

          The system identifies upstream dependencies based on data lineage. Data updates depend on upstream data output.

          Note
          • If the automatically resolved dependencies do not meet your expectations, click the image.png icon to disable the dependency on that node.

          • By default, dependencies are based on the current cycle.

        • Add Dependency

          If automatic dependency resolution fails or the configuration generated by automatic dependency resolution does not meet your requirements, manually add upstream dependencies.

          Click Add Dependency, select Physical Node or Logical Table Node, choose the target nodes, and click OK.

          Note
          • If you have not purchased the Intelligent R&D edition, you can only add dependencies on a Physical Node.

          • If you manually add a dependency and then trigger automatic dependency resolution again, the system overwrites the manual configuration if the auto-resolved node is the same as the manually added one.

        • Edit Dependency

          In the scheduling dependencies list, click the image icon in the Actions column for a target upstream dependency. In the dialog box, modify the Dependency Period, Dependency Policy, and Dependency Field (only modifiable for logical table nodes).Configure scheduling dependencies for an offline task and Scenarios and examples of scheduling dependencies.

          Click the image icon in the Actions column for a target upstream dependency to delete it.

  6. After you confirm that the configuration is correct, click Publish to create and configure the behavioral relationship.

Manage behavioral relationships

  1. The Behavioral Relationship page lists all behavioral relationships with their names, subjects, behaviors, owners, last modification times, and statuses.

  2. (Optional) Filter by behavioral subject, owner, or status, or search by name.

  3. You can perform the following operations on a behavioral relationship in the list.

    Actions

    Description

    Copy

    Copy the current behavioral relationship's information to create a new one.

    Edit

    Edit the behavioral relationship's Basic Information, Processing Logic, and O&M Configuration.

    Note

    If the source table of a behavioral relationship prompts a "Failed to obtain table schema information" error, check whether the source table has been deleted or its name has been changed.

    Take Offline

    Take a published behavioral relationship offline.

    Details

    View the configuration details of the behavioral relationship.

    Delete

    Delete a behavioral relationship that is in the Editing, Publishing Failed, or Offline state.

Next steps

After configuring the behavioral relationship, use it to process offline tags.Offline tags.