---
schema_version: "1"
id: a603df9c732746c8e3834f3b6ae7eb09ed8cffef17979667b960c88b352e7b35
title: prediction Transformation
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_integrate_prediction_transformation.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_prediction_transformation.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ba121c53c4fe66f649caa5dec18bd37822b5c85aaad7207d752de372d338eb8a
description: The prediction transformation produces an Einstein Discovery prediction for a dataset. Einstein Discovery uses predictive analytics, which analyzes historical data (based on data mining, machine learning, and predictive statistical modeling) to identify patterns and predict future outcomes.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# prediction Transformation

The prediction transformation produces an Einstein Discovery prediction for a dataset. Einstein Discovery uses _predictive analytics_, which analyzes historical data (based on data mining, machine learning, and predictive statistical modeling) to identify patterns and predict future outcomes.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
      <colgroup>
        <col style="width:50%">
        <col style="width:50%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d75728e40">User Permissions
            Needed</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d75728e40 ">To add a prediction node to a dataflow:</td>

          <td class="slds-cell-wrap" style="vertical-align:top;" headers="d75728e40 ">View Einstein Discovery Recommendations permission</td>

        </tr>
        <tr class="">
          <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d75728e40 ">To view predictions:</td>

          <td class="slds-cell-wrap" style="vertical-align:top;" headers="d75728e40 ">View Einstein Discovery Recommendations permission (see <a href="https://help.salesforce.com/s/articleView?id=analytics.bi_edd_setup_assign_permsets.htm&amp;type=5&amp;language=en_US" target="_blank">Assign Einstein Discovery Permission Sets to
              Users</a>)</td>

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

After you create an Einstein Discovery story, deploying its model (see [Deploy a Model](https://help.salesforce.com/s/articleView?id=analytics.bi_edd_model_deploy.htm&type=5&language=en_US) ) produces a prediction definition. When you create the transformation, you identify the name of the prediction definition to use. A prediction definition contains a model to use for predicting an outcome. Einstein Discovery creates a special column in your dataset to contain the prediction score (the predicted value of the outcome, such as the likelihood that a customer churns). You also specify the name and display name of the new column.

Consider the following guidelines when creating a prediction transformation:

- To see the Prediction button in the toolbar, Einstein Discovery must be enabled in your org, and your user account must have the View Einstein Discovery Recommendations permission. For instructions, see [Set Up Einstein Discovery](https://help.salesforce.com/s/articleView?id=analytics.bi_edd_help_setup.htm&type=5&language=en_US) . zzz
- Before you can add a prediction transformation, you must deploy the model. For instructions, see [Deploy a Model](https://help.salesforce.com/s/articleView?id=analytics.bi_edd_model_deploy.htm&type=5&language=en_US) .
- Dataset column names must match the dataset column names that were used to create the story. Do not rename column names in the dataflow. Renaming column names results in missing column warnings when the dataflow completes. Other columns are ignored, such as fields created using computeExpression. The field mappings to a Salesforce object, specified when deploying the model (see [Deploy a Model](https://help.salesforce.com/s/articleView?id=analytics.bi_edd_model_deploy.htm&type=5&language=en_US)), do not apply to predictions in dataflows.
- Use a prediction definition with one model. A prediction definition with multiple models (those deployed with filters) isn’t currently supported in dataflows.

## prediction Transformation Properties in the Dataflow Editor

This table describes the settings for the prediction node in the dataflow editor.

  
| Setting | Required? | Value |
| --- | --- | --- |
| Node Name | Yes | Unique name that identifies this node in the dataflow JSON. Use this name to reference this node in other nodes. |
| Source Node | Yes | Dataflow node used as input for this transformation. The prediction transformation generates the prediction score based on the data provided by the input node. |
| Prediction Definition | Yes | Prediction definition to use. Click the field to select from a list of deployed prediction definitions. |
| Prediction Output Field Name | Yes | Name of the new dataset column to contain the score. |
| Prediction Output Field Labels | Yes | Label of the new dataset column to contain the score. |

## prediction Transformation Parameters in the Dataflow JSON

When you define a prediction transformation in the dataflow JSON, you specify the node name, action, source dataflow node, and input parameters for this transformation.

This table describes the JSON input parameters for the prediction transformation ("action": "prediction") in the dataflow.

  
| Parameter | Required? | Value |
| --- | --- | --- |
| predictionDefinitionName | Yes | Name of the prediction definition to use. The Model Manager displays prediction definition Ids. See [Manage Models and Predictions](https://help.salesforce.com/s/articleView?id=analytics.bi_edd_model_manager.htm&type=5&language=en_US) . |
| predictionColumnName | Yes | Name of the new dataset column to contain the score. |
| predictionColumnLabel | Yes | UI label of the new dataset column to contain the score. |

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

Example Let's look at an example that predicts the likelihood that each customer churns and then compares the prediction against the actual outcome.

```
{
                "Customers": {
                "action": "edgemart",
                "parameters": {
                "alias": "Customers"
                
                },
                "edScore": {
                "action": "prediction",
                "parameters": {
                "predictionDefinitionName": "How_to_min_pAw3D_7383",
                "source": "Customers",
                "predictionColumnLabel": "Likelihood to Churn",
                "predictionColumnName": "attrition_score"
                
                },
                "Predicted": {
                "action": "computeExpression",
                "parameters": {
                "source": "edScore",
                "computedFields": [
                
                "name": "PredictedChurn",
                "saqlExpression": "case when 'attrition_score' > 0.4988 then "true" else "false" end",
                "label": "PredictedChurn",
                "type": "Text"
                
                ],
                "mergeWithSource": true
                
                },
                "Correct": {
                "action": "computeExpression",
                "parameters": {
                "source": "Predicted",
                "computedFields": [
                
                "name": "CorrectPrediction",
                "saqlExpression": "case when 'PredictedChurn' == 'Churn__c' then "true" else "false" end",
                "label": "CorrectPrediction",
                "type": "Text"
                
                ],
                "mergeWithSource": true
                
                },
                "Register": {
                "action": "sfdcRegister",
                "parameters": {
                "name": "Customers with Score",
                "alias": "CustomerWithScore",
                "source": "Correct"
                
                
                }
```