Loading
Intermittent Errors with Salesforce Trial Org Registration Read More
CRM Analytics
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          flatten Transformation Parameters

          flatten Transformation Parameters

          When you define a flatten transformation, you set the action attribute to flatten Transformation and specify the parameters.

          The following table describes the input parameters:

          Parameter Required? Value
          include_self_id No Indicates whether to include the self ID node in the generated multi_field and path_field columns. Valid values are false (default) and true.
          self_field Yes Name of the input field that identifies each node in the hierarchy.
          parent_field Yes Name of the input field that identifies the direct parent of each node in the hierarchy. For example, the Regional Manager 1 role is the parent of the Salesperson 1 role in a role hierarchy.
          multi_field Yes

          Name of the multivalue output field that contains a list of all ancestors in the hierarchy, in order from the lowest to the highest level. The flatten Transformation creates this field and generates the list of ancestors for each node in the hierarchy. For example, for Salesperson 1 role, the hierarchy of ancestors is: Sales Manager 1, Regional Manager 1, ​Vice President 1, CEO.

          path_field Yes A string representation of the multi-field field, separated by backslashes. This output field contains the hierarchical path of all ancestors in the hierarchy, in order from the lowest to the highest level. The flatten Transformation creates this field and generates the ancestry path for each node in the hierarchy. For example, for a salesperson role in a role hierarchy, the value is: Sales Manager 1\Regional Manager 1​\Vice President 1\CEO.
          source Yes Node in the dataflow definition file that contains the hierarchical data that you want to flatten. This node is the input source for this transformation and it must contain the input fields mapped to self_field and parent_field.
          Note
          Note By default, the multi_field and path_field fields are created as system fields, which aren’t visible in the user interface. To make the fields appear in the user interface, add a schema section to the flatten Transformation and set the IsSystemField metadata attribute to false for each field in the transformation. The schema section is shown in bold in this sample JSON.
          "Flatten_UserRole": {
              "schema": {
                "objects": [
                  {
                    "label": "UserWithRoles",
                    "fields": [
                      {
                        "name": "Roles",
                        "label": "Roles",
                        "isSystemField": false
                      },
                      {
                        "name": "RolePath",
                        "label": "RolePath",
                        "isSystemField": false
                      }
                    ]
                  }
                ]
              },
              "action": "flatten",
              "parameters": {
                "source": "Extract_UserRole",
                "self_field": "Id",
                "parent_field": "ParentRoleId",
                "multi_field": "Roles",
                "path_field": "RolePath",
                "include_self_id": false
              }
            },
          For more information about overriding metadata using a schema section in a transformation, see Overriding Metadata Generated by a Transformation.
           
          Loading
          Salesforce Help | Article