> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Subset Processing for Magic ETL on Snowflake (Beta)

### Intro

It can be costly to process all of your data every time a Magic ETL DataFlow runs on Snowflake. Subset Processing provides data selection options at the beginning of your flow and additional update methods at the end of your flow so you can choose a smaller subset of your data to transform.

This article describes each of the available options.

<Note>
  **Want to perform a full Replace?** Don't worry, this option is always available. When processing large DataSets, you can try our other update methods—Append, Partition, and Upsert—for more flexibility. Learn about these methods [below](#update_methods).
</Note>

***

### Required Grants

In Domo, you need to have the following grants enabled to use Subset Processing for Magic ETL on Snowflake:

* **Edit Adrenaline DataFlow —** You must have this grant through your system or custom role. Learn how to [add grants to a custom role](/s/article/360043438973).
* One of the following:
  * (Admin-level) **Manage Cloud Accounts —** This grant is considered admin-level because it gives the holder access to instance-wide controls.

    OR
  * If Integration Sharing is enabled, the **Edit DataFlow** **grant** AND **Can Write permission** to the integration account.

    Learn how to [share an integration](https://domo-support.domo.com/s/article/4412849158167?language=en_US#share_integration).

    <Warning>
      **Important:** To use Subset Processing for Magic ETL on Snowflake, your Snowflake-Cloud Amplifier integration must be configured for WRITE and TRANSFORM. Learn how to [configure your integration](/s/article/4402322966807).
    </Warning>

### Access Subset Processing for Magic ETL on Snowflake

If your [Snowflake-Domo integration](/s/article/4402322966807) has been configured, you can choose a Snowflake cloud on which to execute your transform from inside Magic ETL.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/XLeSvlwfBHPJHbmY/images/kb/ka0Vq000000AMQf-00N5w00000Ri7BU-0EMVq000000w4o1.jpg?fit=max&auto=format&n=XLeSvlwfBHPJHbmY&q=85&s=2270c1c84ab6012bcb9b8536dd1cb0b8" style={{width: 800, height: 403}} width="1004" height="506" data-path="images/kb/ka0Vq000000AMQf-00N5w00000Ri7BU-0EMVq000000w4o1.jpg" />
</Frame>

The [data selection options](#new_selection_options) described in this article are available when configuring the Input tile, and the [data update methods](#new_update_methods) are available when configuring the Output tile.

Learn how to [create a Magic ETL DataFlow](/s/article/360055259234).

### Filter Incoming Data with Data Selection Options

Before your data enters the transformation flow, you can filter your input DataSets using the Data Selection options available when configuring the Input DataSet tile in Magic ETL.

Follow these steps to choose a data selection option:

1. Open Magic ETL and choose a Snowflake integration on which to run the DataFlow in the **Compute** dropdown.

   If you need to establish a Snowflake-Domo integration, [learn how](/s/article/4402322966807).

   <Frame>
     <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/8E3HpyZujsEhQGNi/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075eOz.jpg?fit=max&auto=format&n=8E3HpyZujsEhQGNi&q=85&s=6698e15097438fbf778a9d52912edbaa" style={{width: 900, height: 391}} width="2056" height="893" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075eOz.jpg" />
   </Frame>
2. Drag an Input DataSet tile to the canvas and choose a DataSet.
3. In the configuration panel below the canvas, use the **Data Selection** dropdown to choose one of the filtering options, described below:

   <Frame>
     <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/8E3HpyZujsEhQGNi/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075ajc.jpg?fit=max&auto=format&n=8E3HpyZujsEhQGNi&q=85&s=7465fce6ca89534ce37b0d538e1ffa7b" style={{width: 900, height: 507}} width="1693" height="954" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075ajc.jpg" />
   </Frame>

   * **All —** This is the default option. This loads all rows in the DataSet.
   * **New —** This option only loads batches added to the DataSet since the DataFlow's last successful execution, including re-stated partitions.
   * **Filter by batch —** This option lets you specify which batches to load based on their creation date using the **Import data when** and **Date is in** dropdowns.

     <Frame>
       <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/8E3HpyZujsEhQGNi/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075fY0.jpg?fit=max&auto=format&n=8E3HpyZujsEhQGNi&q=85&s=4890d80d6246299a5c98649eb0d33138" style={{width: 752, height: 136}} width="1050" height="190" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075fY0.jpg" />
     </Frame>

     * **Using a custom expression —** After choosing **Filter by batch**, you can identify the batches using a custom expression. To do this, expand the **Filter By Batch** section in the configuration panel and use the **Import data when** dropdown to choose **Custom** **expression**.

       <Frame>
         <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/8E3HpyZujsEhQGNi/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075j25.jpg?fit=max&auto=format&n=8E3HpyZujsEhQGNi&q=85&s=5dc0e8ffdbf29875f687db3cd33baa10" style={{width: 751, height: 281}} width="1053" height="394" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075j25.jpg" />
       </Frame>

       Write your formula in the formula field. Use the arrows icon to open the formula editor.

       <Frame>
         <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/8E3HpyZujsEhQGNi/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075jQH.jpg?fit=max&auto=format&n=8E3HpyZujsEhQGNi&q=85&s=c1125965b174067cbc548d7891f8f1c8" style={{width: 750, height: 106}} width="1040" height="147" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075jQH.jpg" />
       </Frame>

       <Frame>
         <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/8E3HpyZujsEhQGNi/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075jTV.jpg?fit=max&auto=format&n=8E3HpyZujsEhQGNi&q=85&s=eab1b668608dab5ef196e88d6b9a650a" style={{width: 748, height: 406}} width="1220" height="662" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075jTV.jpg" />
       </Frame>

       You can reference the batch. id, the date the batch was recorded, or the cursor which is set based on the last successful DataFlow execution.

### Update Methods in the Output Tile

Besides Replace, three additional update methods are available in a Magic ETL on Snowflake DataFlow: Append, Partition, and Upsert. This article doesn't describe each method in detail, but you can learn about them [here](/s/article/000005541).

<Warning>
  **Important:** These update methods are not supported for Snowflake's Time Travel feature.
</Warning>

Follow these steps to configure them.

1. Open Magic ETL and choose a Snowflake integration on which to run the DataFlow from the **Compute** dropdown.

   <Frame>
     <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/Se_X3Rr-QW-5nUF_/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq000006anRl.jpg?fit=max&auto=format&n=Se_X3Rr-QW-5nUF_&q=85&s=510117d71267cbe956abf7c4df2a509a" style={{width: 899, height: 361}} width="3430" height="1378" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq000006anRl.jpg" />
   </Frame>
2. Build your DataFlow to achieve your desired transformation. Learn how to
   [create a Magic ETL DataFlow](/s/article/360055259234).
3. When you add your Output DataSet tile to the canvas, use the configuration panel to choose the update method you want to use.

   <Frame>
     <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/8E3HpyZujsEhQGNi/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075jGc.jpg?fit=max&auto=format&n=8E3HpyZujsEhQGNi&q=85&s=e9fe9969b78fccc3e4ee83663ddbe746" style={{width: 350, height: 423}} width="517" height="625" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq0000075jGc.jpg" />
   </Frame>
4. (Conditional) Configure the Output DataSet tile as required for your update method, described below:

   * **Append —** You don't need to select any columns. Append adds a new batch to the Output DataSet with each execution of the DataFlow.

     <Frame>
       <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/Se_X3Rr-QW-5nUF_/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq000006aoqr.jpg?fit=max&auto=format&n=Se_X3Rr-QW-5nUF_&q=85&s=cb96b46b7f3cca86190b4c4b9f0d75ca" style={{width: 450, height: 357}} width="1154" height="916" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq000006aoqr.jpg" />
     </Frame>
   * **Partition —** Choose the column name that contains the labels to be used for the partitions. This option will append named partitions to the output DataSet, replacing pre-existing partitions with the same name. Learn more about [partitioning](https://domo-support.domo.com/s/article/000005541?language=en_US#partition).

     <Warning>
       **Important:** You can only use one column for your partition. If your partition needs to be a combination of columns, you must concatenate the constituent columns as part of the DataFlow to create a single column.
     </Warning>

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/Se_X3Rr-QW-5nUF_/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq000006ahHb.jpg?fit=max&auto=format&n=Se_X3Rr-QW-5nUF_&q=85&s=9fbb35cb32d845e5d8e31cda82a5b831" style={{width: 551, height: 332}} width="1582" height="954" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq000006ahHb.jpg" />
</Frame>

* **Upsert —** Choose the columns or combination of columns that represent a unique row in your DataSet. This option will add or replace output rows, de-duplicated by an identifier you chose. Learn more about [Upsert](https://domo-support.domo.com/s/article/000005541?language=en_US#upsert).

  <Frame>
    <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/Se_X3Rr-QW-5nUF_/images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq000006ap0X.jpg?fit=max&auto=format&n=Se_X3Rr-QW-5nUF_&q=85&s=0345af39376c7a6653074436cf1027e8" style={{width: 552, height: 314}} width="1564" height="890" data-path="images/kb/ka0Vq000000CPQr-00N5w00000Ri7BU-0EMVq000006ap0X.jpg" />
  </Frame>
