> For the complete documentation index, see [llms.txt](https://docs.rubicon.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rubicon.io/transformations/writing-your-first-transformation.md).

# Writing your first transformation

So, you have connected Rubicon Github App to your repository, connected a few sources and destination to Rubicon and are ready to write your first transformation. This document provides an example of how to do it using the test demo database `rubicon_demo` that should already be connected in your account.

1. Check the table and schemas available in the **catalog** by clicking on the catalog icon on the Models tab.<br>

   <figure><img src="/files/XkNIbWPoCmFYoEgUxfpY" alt=""><figcaption></figcaption></figure>

2. Create a file called `order_and_refunds_by_hour.sql` with the following SQL statement that computes hourly refunds for each merchant. \
   \ <mark style="color:blue;">`SELECT`</mark>` ``hour, merchant_id, SUM(order_amount), SUM(refund_amount)`\ <mark style="color:blue;">`FROM`</mark>` ``orders`` `<mark style="color:blue;">`JOIN`</mark>` ``merchants`` `<mark style="color:blue;">`JOIN`</mark>` ``refunds`

3. Click on the "play" button at the top right hand side to do a preview of the results. You should see something like this:<br>

   <figure><img src="/files/pSt3SdABvSyEklqYNN51" alt=""><figcaption></figcaption></figure>

4. Submit the SQL transformation to your Github repo. Now, you are ready to set up your first pipeline. You can see the instructions [here](/pipelines/deploy-your-first-pipeline.md).

&#x20;
