Loading
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
          Overriding Metadata Generated by a Transformation

          Overriding Metadata Generated by a Transformation

          Optionally, you can override the metadata that is generated by a transformation. You can override object and field attributes. For example, you can change a field name that is extracted from a Salesforce object so that it appears differently in the dataset. To override the metadata, add the overrides to the Schema section of the transformation in the dataflow definition file.

          Required Editions

          Available in: Salesforce Classic and Lightning Experience
          Available for an additional cost in: Enterprise, Performance, and Unlimited Editions

          In the Schema section, you can override the metadata attributes for one object only.

          The Schema section in this sample sfdcDigest transformation contains metadata overrides:

          "Extract_Opportunities": {
             "action": "sfdcDigest",
             "parameters": {
                "object": "Opportunity",
                "fields": [
                   { "name": "Name" },
                   { "name": "Amount" }
                ]
             },
             "schema": {
                "objects": [
                   {
                      "label":"Sales Opportunities",
                      "fields": [
                         {
                            "name": "Amount",
                            "label": "Opportunity Amount"
                         }
                      ]
                   }
                ]
             }
          }

          Object Attributes

          You can override the following object attributes.

          Object Attribute Type Description
          label String

          The display name for the object. Can be up to 40 characters.

          Example:

          "label": "Sales Data"

          description String

          The description of the object. Must be less than 1,000 characters.

          Example:

          "description": "The SalesData object tracks basic sales data."

          fields Array

          The array of fields for this object.

          Field Attributes

          You can override attributes of each specified dataset field.

          Field Attribute Type Description
          name String

          Name of the field in the dataset. Identifies the field that you want to override.

          Examples:

          "name": "Amount"

          "name": "Role.Name"
          label String

          The display name for the field. Can be up to 255 characters.

          Example:

          "label": "Opportunity Amount"

          description String

          The description of the field. Must be less than 1,000 characters.

          Add a description to annotate a field in the dataflow definition file. This description is not visible to users in the Analytics user interface.

          Example:

          "description": "The Amount field contains the opportunity amount."

          isSystemField Boolean

          Indicates whether this field is a system field to be excluded from query results.

          Example:

          "isSystemField": false

          format String

          The display format of the numeric value.

          Example:

          "format": "$#,##0.00" (Numeric)

          For more information about valid formats, see Numeric Formats.

          Numeric Formats

          An example of a typical numeric value is $1,000,000.99, which is represented as $#,##0.00 in the format field. You’re required to specify the precision and scale of the number. The format is specified by using the following symbols:

          Symbol Meaning
          0 One digit. Use to add leading or trailing 0s, like #,###.00 for $56,375.00.
          # Adds zero or one digit
          . Default symbol used as the decimal separator. Use the decimalSeparator field to set the decimal separator to a different symbol.
          - Minus sign
          , Grouping separator. Use the groupSeparator field to set the group separator to a different symbol.
          $ Currency sign. Use the currencySymbol field to set the currency indicator to a different symbol.
          Note
          Note The format for numeric values when displayed in the UI defaults to No Format. Existing formatting is removed. For data ingestion, numeric values can’t contain any formatting (such as currency symbols or grouping separators). For example, $1,000.00 isn’t a valid numeric value; the correct value is 1000.00.

          Valid characters when defining a numeric format are:

          • 0
          • #
          • ,
          • -
          • ,
          • $
          Example
          Example

          Let’s consider an example where you want to override the following object and field attributes that the sfdcDigest transformation extracts from the Opportunity object.

          Object/Field Attribute Changes
          Opportunity object
          • Change the object label to "Sales Opportunities"
          • Add an object description
          Id field
          • Change the field label to "Opportunity Id"
          • Hide the field from queries
          Amount field
          • Change the field label to "Opportunity Amount"
          • Change the format to $#,##0.00
          CloseDate field
          • Change the field label to "Closing Date"

          To override the attributes, you add the Schema section with the override values to sfdcDigest in the dataflow definition file.

          {
          "Extract_Opportunities": {
             "action": "sfdcDigest",
             "parameters": {
                "object": "Opportunity",
                "fields": [
                   { "name": "Id" },
                   { "name": "Name" },
                   { "name": "Amount" },
                   { "name": "StageName" },
                   { "name": "CloseDate" },
                   { "name": "AccountId" },
                   { "name": "OwnerId" }
                ]
             },
             "schema": {
                "objects": [
                   {
                      "label":"Sales Opportunities",
                      "description": "These are all sales opportunities.",
                      "fields": [
                         {
                            "name": "Id",
                            "label": "Opportunity Id",
                            "isSystemField": true
                         },
                         {
                            "name": "Amount",
                            "label": "Opportunity Amount",
                            "format": "$#,##0.00"
                         },
                         {
                            "name": "CloseDate",
                            "label": "Closing Date"
                         }
                      ]
                   }
                ]
             }
          },
           "Register_Dataset_Opportunities": {
             "action": "sfdcRegister",
             "parameters": {
                "source": "Extract_Opportunities",
                "alias": "Opportunities",
                "name": "Opportunities"
                }
             }
          }
          Important
          Important Analytics removes Schema sections from all transformations except sfdcDigest when you add a dataflow to a package. If you intend to package a dataflow, we recommend that you specify field attributes in the transformation itself, instead of in a schema section. For example, this computeRelative transformation uses a label attribute to change a field’s label.
            "CalcAmountAfterdiscount": {
              "action": "computeExpression",
              "parameters": {
                "mergeWithSource": true,
                "source": "getOpps",
                "computedFields": [
                  {
                    "name": "DiscountedAmount",
                    "label": "Discounted Amount",
                    "type": "Numeric",
                    "saqlExpression": "Amount * Discount_Percentage__c",
                    "precision": 10,
                    "scale": 2
                  }
                ]
              }
            },
           
          Loading
          Salesforce Help | Article