# Transform

The transformation in ETL starts with the extraction of data from the selected data sources.

The Transformation looks like

<figure><img src="https://lh7-us.googleusercontent.com/_PINWGJizTlh2ueonEX_2-k1VKJjKosvjKurGv0oVIufpWFCC1zFbhyjMpr-mQVOKOFDj_LpwSFuLKduP5nAhCbd6jJDFY3sMiBiwrD1w1-KoP7fhdNTtB_rDq5kFmNXAc7a8RXvemRElGe33re0p9M" alt=""><figcaption></figcaption></figure>

The Transformation is divided into different sections.

**Data Source**

This section starts from the click of the Extract button, all the data from different sources are extracted and displayed. For now we are taking the data source as an Object and getting Account data.

<figure><img src="https://lh7-us.googleusercontent.com/7W_n3wdMnu0pVZfiMUFpPzLs27T3wrjitQ_MMfY8aaB6gWnVGB3dWsr0qXAqXs3L7sSegibd2XFg6Pxrl50ZB_c8yYjXxI1D2Jw2RIEZkG7L4nTC90zt1L5UyrVVefik8AqyecjKtEbDklDM6TkR1jg" alt=""><figcaption></figcaption></figure>

**Expected JSON**

This is the section where the user needs to place the kind of JSON he is expecting. For now we can take the same Extracted JSON.

<figure><img src="https://lh7-us.googleusercontent.com/ZaOH1cgqcC0Lm4K_za5XdSgDbeAtGBqqGUhiIAJC6YM2XlbZy9sXiHfoni3r016KGT1dRWrf6cFNKecmYoMrFK3Ykea7P8McAZEcm3cUn7hiFHehh8jtqV6AxQcNyKwVTrcyNN5XzWoLkQ12XYmNMW4" alt=""><figcaption></figcaption></figure>

After the Expected JSON part there comes two sections which includes.

**Key Value Mapper**

he Key Value Mapper helps us to Map our Extracted JSON (Data Source JSON) with the Expected JSON. The Key Value Mapper provides one functionality to Add All Expected from the Expected JSON. The Add All functionality works only when the Expected JSON is provided.

<figure><img src="https://lh7-us.googleusercontent.com/I1eTb8J0lBqFzYX9NsK0DblljuViVuav_FaP4FtL8AgXtUwEMbXav4AzqqIeBX7MsA26ZMSiJ49qrzcjkrqvx0R60VWIK6f3H_8t9y_PbaXbWin8wh8fcnEWedzNAU9iV3pL0y8rMoEgqQ5o9MtVKuk" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-us.googleusercontent.com/hXVILyKYIOLg7O3EOP16Sv1xYkWSwNtin1bScg6RdnhmRfPPNdGSrkkXuKDb4T3QEkJtblsAxm2Xywx6qiITEJezG0Wm-6wsszFQFxMIMkvts_oL8gYdy5vQb4ZveM26iOxGoOyl_72mVCJfYii0ipU" alt=""><figcaption></figcaption></figure>

The Add All Functionality takes out all the keys from the Expected JSON and gives the feature to map with any of the value from the Extracted JSON.

**Transform Map Value**

The Transform Map Value adds on a feature to set the default value for a particular key from the Key Value Mapper based on certain conditions.

<figure><img src="https://lh7-us.googleusercontent.com/yTH2dq4N0L2LSYYsfLwusgavy_NMWmChVfMjsKA9pFLrH_fMzFP7jumBMW4rCsOFGf-AcJr8fFhGGIVd0q5qATB96k4eSgbjfLIWgCfKZdJx7zLG6nq1IY_jssRpjiLkKtPNoSaooVnahre-hh9-sBM" alt=""><figcaption></figcaption></figure>

<br>

<figure><img src="https://lh7-us.googleusercontent.com/GbaL65LKbh0nL8ehuJVv9y0rz_jlGmc7PHOB2D5YidL9iiN4CUqxlwKMk67JSFPXZxRG52GN-kiSJXDBhcfGcZsPWzQi4JGOmIT2q-h6CSBsp3PzJ1NL1GTF-uPphO_RLB9f2ZYF00vbuaBkANkz1uo" alt=""><figcaption></figcaption></figure>

At a time the user can set the default value for different keys from the **Expected JSON**. The user needs to provide the Key of the Expected JSON and default value. The Value Map is used to set put an extra check on the value of the Expected Path.

<figure><img src="https://lh7-us.googleusercontent.com/ncjjK3vHa52lVjxHcf6YOV0GTfPWTSJGStqa0gNLENIQYIF0fBWefId4dEnuyRBYz2VdmTguOs6bRptaJa_FGlQ5gGDOkbatEd1YsjpdkTVmSYp33yQrkpFo553NwSlbgVN4vhRFX-e-PCFQrOYh-YE" alt=""><figcaption></figcaption></figure>

If any of the Key from the Value Map matches the Value of The Expected Path then the corresponding Value of the Value Map will be replaced with the Value of the Expected Key Path. If none of the value matches then the default value will be replaced.

**Preview**

After this all the User can Save the ETL and Run The ETL. On Successful Execution, the User can see the desired result on the Preview Section.

<figure><img src="https://lh7-us.googleusercontent.com/AMXcFA_WddU3TSCECi-KHzahK_SgIjapYlUhmgHL9rx9vGh-fFik-V804TvXmjiF6BPOq93VzYdl9zicVmobABCpoAmbjTDsCpyT3k49R8KWz-Cf2o1pBGcs2y-uFF3C8WMHK_ypmyo2jOiuvhKvNJA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-us.googleusercontent.com/LVbJoYvPEsUcp8wjz5B85EZw6o5sf0ISWkJhMGqO471QYlofVdThe9X2f2e57kx2q4Eo_9dNdcvcrTaocmLFORdumAI2wXchgDkFNCdQcZbq1CfJJGd4_zcoiIPmONHTrjMO6Am9bghUdOcjahUX6qY" alt=""><figcaption></figcaption></figure>

Here we are setting the details in the Value Map, if it matches then it will be replaced with Edge Communication else it will be replaced with Edge.

<figure><img src="https://lh7-us.googleusercontent.com/E_6GM89aBp-Kb8FyFAUmVN86Q_j0ims2N9YikYLwa_udXMIAaRVMMpFVnPlmBnaCennrutDetUd2oePK3k3_24DxZHQVw8_Ix_EZgtSJ8WKMtZQg0V5lhM8lSo-FN1GkGJrcuhnz3PpwanjEwy8VH8s" alt=""><figcaption></figcaption></figure>

As the value matched with the First element of the JSON so, the name is replaced with Edge Comm. And on Successful run we are able to see the Preview.

**Output JSON**

This shows us the Key Value Mapper as in the JSON Format.

<figure><img src="https://lh7-us.googleusercontent.com/iXMbXijWqrCfw3eZGu7pjivZ0Sd_y8Rg0GALFfYx_3QjduQp7-E0rNuNHqlueY40w3JIbm9KiVybuukI5C2nnl3_ItOnvWp5QKiD4Fdp_sA5ZnPk6tFR7Rlr_od8TlAm_NVN-fu1aHbr0xcT0Q91GO4" alt=""><figcaption></figcaption></figure>

As we wrap up our exploration of the Transform phase in this section, the spotlight now shifts to the Load realm. Join us in the next section as we delve into the intricacies of the Load stage, unraveling the power of data metamorphosis and its pivotal role in shaping a comprehensive ETL process.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://200ok.gitbook.io/200ok-documents/user-manual/etl/create-your-etl/transform.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
