---
schema_version: "1"
id: cfcba119b974e5b097d2452732db353626cb39f019ffd4e21cc0d552b61e0175
title: flatten Transformation Parameters
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_integrate_flatten_transformation_operation.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_flatten_transformation_operation.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 36f0764930ed3e01f01e6f8b5b515fa8159fd1b548894ebe17254b74d52859d2
description: When you define a flatten transformation, you set the action attribute to flatten Transformation and specify the parameters.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# 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:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:25%">
          <col style="width:25%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d189471e44">Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d189471e47">Required?</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d189471e50">Value</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e44 ">include_self_id</td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e47 ">No</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e50 ">Indicates whether to include the self ID node in the generated multi_field and
              path_field columns. Valid values are <code>false</code>
              (default) and <code>true</code>.</td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e44 ">self_field</td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e47 ">Yes</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e50 ">Name of the input field that identifies each node in the hierarchy.</td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e44 ">parent_field</td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e47 ">Yes</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e50 ">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.</td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e44 ">multi_field</td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e47 ">Yes</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e50 ">
              <p style="margin-bottom:0;">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: <code>Sales Manager 1, Regional Manager 1, ​Vice President 1,
                    CEO</code>. </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e44 ">path_field</td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e47 ">Yes</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e50 ">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: <code>Sales
                  Manager 1\Regional Manager 1​\Vice President 1\CEO</code>.</td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e44 ">source</td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e47 ">Yes</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d189471e50 ">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.</td>

          </tr>
        </tbody>
      </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_note.png)

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](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_transformation_schema_override.htm&type=5&language=en_US).

#### See Also

- [flatten Transformation](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_flatten_transformation.htm&release=264.0.0&type=5 "The flatten transformation flattens hierarchical data. For example, you can flatten the Salesforce role hierarchy to implement row-level security on a dataset based on the role hierarchy.")