---
schema_version: "1"
id: f69613a18374f2e58d62542aa68af4efe265dfc9a15a750369c8159e3954e085
title: sliceDataset Transformation
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_integrate_slicedataset_transformation.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_slicedataset_transformation.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 086e2603b262af28414f70ea083aa7311326e30ff4d20119caaa202f234744e2
description: The sliceDataset transformation removes fields from a dataset in your dataflow, leaving you with a subset of fields for use in a new dataset or in other transformations. This allows you to create multiple datasets, each with different sets of fields from a single dataset.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# sliceDataset Transformation

The sliceDataset transformation removes fields from a dataset in your dataflow, leaving you with a subset of fields for use in a new dataset or in other transformations. This allows you to create multiple datasets, each with different sets of fields from a single dataset.

![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 To drop columns in a Data Prep recipe, see [Drop Columns Transformation: Drop Columns from the Recipe](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_recipe_transformation_dropcolumns.htm&release=264.0.0&type=5 "In CRM Analytics, drop unwanted columns from a Data Prep recipe. For example, you can add a Drop Columns transformation after a Formula transformation to drop input columns used for a calculated column.").

The transformation includes the `mode` parameter, which lets you choose between two modes: `drop` or `select`. Set it to `drop` to _remove_ the fields you specify. Set it to `select` to _keep_ the fields you specify.

![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

Here’s an example. Let’s say your dataflow contains an sfdcDigest node, `ExtractOpportunities`, that extracts all fields from the Opportunity object. However, some of your users don’t want Id fields in their Opportunities dataset. You resolve this by adding a sliceDataset node to your dataflow, specifying the source node, the fields you want to remove from that node, and `drop` mode.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:50%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="text-align:center;vertical-align:top;" id="d184145e80">sliceDataset Node in Dataflow Editor</th>
                <th scope="col" class="slds-cell-wrap" style="text-align:center;vertical-align:top;" id="d184145e83">sliceDataset Node in Dataflow JSON</th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="sliceDataset Node in Dataflow Editor" class="slds-cell-wrap" style="vertical-align:top;" headers="d184145e80 ">
                  <div><img src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_integrate_dataflow_editor_slicedataset_node.png" alt="sliceDataset node in dataflow builder"></div>
                </td>

                <td data-label="sliceDataset Node in Dataflow JSON" class="slds-cell-wrap" style="vertical-align:top;" headers="d184145e83 ">
                  <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>{
  "RemoveFieldsFromExtractOpportunities": {
    "action": "sliceDataset",
    "parameters": {
      "source": "ExtractOpportunities",
      "mode": "drop",
      "fields": [
        {
          "name": "Id"
        },
        {
          "name": "Pricebook2Id"
        }
      ]
    }
  }
}</code></pre>
                </td>

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

- **[sliceDataset Parameters](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_slicedataset_transformation_operation.htm&release=264.0.0&type=5)**  
    Add a sliceDataset transformation to a dataflow either in the dataflow editor, or directly in the JSON dataflow definition file. The parameters you specify are the same for both methods.