Loading
Feature degradation | Gmail Email delivery failureRead 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
          update Transformation

          update Transformation

          The update Transformation updates the specified field values in an existing dataset based on data from another dataset, which we call the lookup dataset. The transformation looks up the new values from corresponding fields in the lookup dataset. The transformation stores the results in a new dataset.

          Note
          Note To update columns in a Data Prep recipe, see Update Node: Swap Column Values.

          When you create the transformation, you specify the keys that are used to match records between the two datasets. To dictate which field in the lookup dataset updates the field in the source dataset, you also map the corresponding fields from both dataset.

          For example, you have an existing Accounts dataset that contains account information—Id, Name, and AnnualRevenue. Unfortunately, some of the account names in the dataset are now incorrect because of a series of mergers and acquisitions. To quickly update the account names in the dataset, you perform these tasks.

          1. Create a .csv file that contains the new account names and associated account IDs for accounts that have name changes.
          2. Upload the .csv file to create a dataset called UpdatedAccountNames.
          3. Create a dataflow definition file to update account names in the Accounts dataset by looking up the new account names in the UpdatedAccountNames dataset.
            The diagram shows that the Id field from Accounts joins with the AccountID field from UpdatedAccountNames. Also, the values in the NewAccountName field in UpdatedAccountNames replaces values for the Name field in Accounts.

          You create the following dataflow definition file.

          {
             "Extract_AccountDetails": {
                "action": "sfdcDigest",
                "parameters": {
                   "object": "Account",
                   "fields": [
                      { "name": "Id" },
                      { "name": "Name" },
                      { "name": "AnnualRevenue" }
                   ]
                }
             },
             "Extract_UpdatedAccountNames": {
                "action": "edgemart",
                "parameters": { "alias": "UpdatedAccountNames" }
             },
             "Update_AccountRecords": {
                "action": "update",
                "parameters": {
                   "left": "Extract_AccountDetails",
                   "right": "Extract_UpdatedAccountNames",
                   "left_key": [ "Id" ],
                   "right_key": [ "AccountID" ],
                   "update_columns": { "Name": "NewAccountName" }
                }
             },
             "Register_UpdatedAccountRecords": {
                "action": "sfdcRegister",
                "parameters": {
                   "alias": "Accounts",
                   "name": "Accounts",
                   "source": "Update_AccountRecords"
                }
             }
          }

          Let’s look at another example, where a composite key is used to match records between both datasets. In this case, you match records using the account ID and account name fields.

          You create the following dataflow definition file.

          {
             "Extract_AccountDetails": {
                "action": "sfdcDigest",
                "parameters": {
                   "object": "Account",
                   "fields": [
                      { "name": "Id" },
                      { "name": "Name" },
                      { "name": "AnnualRevenue" }
                   ]
                }
             },
             "Extract_UpdatedAccountNames": {
                "action": "edgemart",
                "parameters": { "alias": "UpdatedAccountNames" }
             },
             "Update_AccountRecords": {
                "action": "update",
                "parameters": {
                   "left": "Extract_AccountDetails",
                   "right": "Extract_UpdatedAccountNames",
                   "left_key": ["Id","Name"],
                   "right_key": ["AccountId","NewAccountName"],
                   "update_columns": {
                      "Name": "NewAccountName",
                      "CreatedDate":"NewCreatedDate",
                      "AnnualRevenue":"NewAnnualRevenue"
                }
             },
             "Register_UpdatedAccountRecords": {
                "action": "sfdcRegister",
                "parameters": {
                   "alias": "Accounts",
                   "name": "Accounts",
                   "source": "Update_AccountRecords"
                }
             }
          }
          • update Parameters
            When you define an update transformation, you set the action attribute to update and specify the parameters.
           
          Loading
          Salesforce Help | Article