Loading

Overwrite a dataset with the contents of another dataset

Дата публикации: Oct 13, 2022
Описание
In CRM Analytics (Tableau CRM), there are situations where you may need to update an existing dataset with a different dataset, but doing so would typically require updating the dataset ID in any dashboards or lenses that reference the dataset.

One example situation where this can be needed is when a recipe is updated to save to a different app, which causes a new target dataset to be created and associated to the recipe. When this occurs, the recipe will no longer update the original dataset, and it cannot be directly updated to point to the original dataset again.
Решение
Using an edgemart and register node, you can copy the contents of your new dataset and overwrite the old dataset with those contents. This will result in the dataset ID staying the same and avoid needing to change any dashboards to use the new dataset.

Before using this approach, please be sure to back up your existing Default Salesforce Dataflow using the below steps:

1. In Analytics Studio, click the Gear icon and then click Data Manager
2. Click on Monitor
3. Select the Dataflows tab
4. Locate the Default Salesforce Dataflow, click the down arrow, and select Download

Once the dataflow has been backed up, proceed with the following steps:

Note: The below steps use "New_Dataset" and "Old_Dataset" as examples. You'll want to update these with the actual aliases used by your datasets.
1. Create a copy of your backed up Default Salesforce Dataflow file
2. Open the copy in a text editor
3. Add the following lines to the end of the dataflow using the appropriate syntax:
 
{
  "node1": {
    "action": "edgemart",
    "parameters": {
      "alias": "New_Dataset"
    }
  },
  "node2": {
    "action": "sfdcRegister",
    "parameters": {
      "alias": "Old_Dataset",
      "name": "Old Dataset",
      "source": "node1"
    }
  }
}

4. Upload the modified dataflow file and start the Default Salesforce Dataflow
5. Once the dataflow completes successfully, you should then see that the "Old_Dataset" dataset now has the same contents as the "New_Dataset" dataset
 
Explanation
  • "node1" digests the new dataset that contains the data you wish to see in the old dataset
  • "node2" attempts to register a dataset using the results of "node1" with the original name of "Old_Dataset"
  • Since sfdcRegister is an overwrite operation, it overwrites the existing dataset with the contents of "New_Dataset" but keeps the original dataset ID and system (API) name of the "Old_Dataset" dataset

Note: You will need to make sure that your dataflow containing the above nodes is scheduled to always run only after "New_Dataset" is updated. This ensures that the contents of "Old_Dataset" will always reflect the latest contents of "New_Dataset".

Номер статьи базы знаний

000382629

 
Загрузка
Salesforce Help | Article