
The Data Transformation node is useful for the workflows whose purpose is to retrieve the data, structure it to meet requirements and process them further. Examples of such workflows can be retrieving a file from an external source and importing it to Synerise. The intermediate step between these two actions is converting the data structure, which can be achieved by means of the **Data Transformation** node. 

The Data Transformation node performs the operations on a file according to the logic described by a [transformation rule](/docs/automation/data-transformation-and-imports/creating-data-transformation) which you must select in the configuration of this node. 

### How does it work

When you create a workflow which includes the **Data Transformation** node, you must add a node that contains the target file to be transformed (see [Prerequisites](#prerequisites)) right before the **Data Transformation** node. 

When a launched workflow arrives at the Data Transformation node, the system performs the modifications to the target file according to the rules defined in the transformation rule selected in the node. It is important to select the transformation rule designated for the structure of the target file for the successful transformation.  

#### What if the target file does not fully comply with the transformation rules?

Transformation will be performed but may not always be successful. The **Data Transformation** node accepts uneven data (for example, when a file contains a column that keeps information about the resolution of a product, which is required for items such as computers but not necessary for AGD equipment) but may not always transform them correctly.

**Example 1**: If a transformation rule was based on a file sample with columns: `A`, `B`, and `C`. The **Data Transformation** node receives the actual file with only `B` and `C` columns, the transformation of such file will be performed. 

**Example 2**: A transformation rule was based on a file sample with columns: `A`, `B`, and `C`, but the **Data Transformation** node receives the actual file with `A`, `B` and `D` columns. 
If the transformation rule contains a condition a column `D` qualifies to (for example, a specific value is added to columns whose names start with `A`, `B`, `C`, and `D`), then the transformation will be performed, even if the `D` column wasn't present in a file sample.  
However, if column `D` doesn't qualify for any condition, the column will be imported as delivered in the file. 

## Prerequisites
---
- You must create a [transformation rule](/docs/automation/data-transformation-and-imports/creating-data-transformation).
- The workflow which includes the **Data Transformation** node must contain one of the following nodes:
    - [Local File](/docs/automation/operation/local-file-node)
    - [Get File (HTTPS)](/docs/automation/integration/http-integrations/http-get-file)
    - [Get File (SFTP)](/docs/automation/integration/sftp-integrations/sftp-get-file)
    - [Get File (Google Cloud Storage)](/docs/automation/integration/google-cloud-storage/get-file-from-gcs)
    - [Get File (Azure Blob Storage)](/docs/automation/integration/azure-blob-storage/get-file-azure-blob-storage)
    - [Get file (Amazon S3)](/docs/automation/integration/amazon-s3-bucket/get-file-amazon-s3-bucket)
    - [Get Profiles](/docs/automation/actions/synerise-integrations/get-profiles)
    - [Get Statistic](/docs/automation/actions/synerise-integrations/get-statistics)
    - [Get Catalog Data](/docs/automation/actions/synerise-integrations/export-data-from-catalog)
    - [Get Analytics Report](/docs/automation/actions/synerise-integrations/get-analytics-report)
    - [Get Metrics](/docs/automation/actions/synerise-integrations/get-metric-results)
    - [Get Data (Google BigQuery)](/docs/automation/integration/google-bigquery/get-data-reverse-etl)
    - [Get Data (Snowflake)](/docs/automation/integration/snowflake/get-data-reverse-etl)
    - [Get Data (Databricks)](/docs/automation/integration/databricks/get-data-reverse-etl)

## Node configuration
---  


<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

In contrast to the majority of nodes in Automation Hub, **Data Transformation** node is an operation node, which means it must complete before the workflow can proceed to the next node.

</div></div></div>


1. Click the **Data Transformation** node.  
2. From the dropdown list, select the transformation rule.  
    **Result**: The pop-up window displays the column a file contains.

## Example of use
---
This example describes a procedure of creating a workflow that performs a single import of a file with transactions uploaded from the device. The workflow performs the transformation of the file with transactions so it complies with the Synerise requirements. After the transformation, the file with transactions is imported to Synerise.

1. Learn about the [requirements for import of transactional data](/docs/automation/actions/synerise-integrations/import-transactions#requirements).
2. Prepare a [transformation rule](/docs/automation/data-transformation-and-imports/creating-data-transformation) according to the requirements.
1. Create the new workflow and start it with the **Scheduled Run** node.  
2. In the configuration of the node, set it to be scheduled immediately.
3. Add the **Local File** node. In the configuration of the node, upload the file with transactions.  
        
   <div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   If you store the file on a server, select [HTTP](/docs/automation/integration/http-integrations) or [SFTP](/docs/automation/integration/sftp-integrations) node and follow the instructions on the interface.

   </div></div></div>

4. Add the **Data Transformation** node.
5. In the configuration of the node, select the transformation you prepared in step 2.
3. Add the **Import Transactions** node. In the settings of the node, you can check the list of the required columns.
4. Add the **End** node.  
    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/import-with-data-transformation.png" alt="Example of use" class="full">
    <figcaption>Single import of transactions to Synerise</figcaption>
    </figure>
5. Click **Save & Run**.