Create Transformations
Last updated
Last updated
====================================
Access the Transformations feature.
Models are a meant to represent a grouping of logical transformation schema
Finalize the creation by clicking "Create".
Click the model to see all the transformations within it
In this situation, we haven't created any transformations so it will be empty
Click "New Transformation" to create a new transformation within the model
At the moment, only PostgreSQL and MySQL are supported but we will add support for other sources soon
In this example, we will name the transformation as "payments".
Type your SQL statement as a CTE. In order to reference a source connection, you MUST use the source designation e.g. {{ source('jaffleshop', 'payments') }}
Compile the transformation.
If your SQL compilation is successful, you should see a preview of your results. Note: Context Data will only return 5 results to the view
Provide a description for the transformation.
Save the transformation.
Click your model and should see the newly created model
In this example, we will create another transformation
Create a new transformation
Just the first transformation, we're going to enter the SQL query to create the transformation
Compile the transformation.
If your SQL compilation is successful, you should now be able to save the transformation.
View all transformations within the model
In the previous examples, we created SQL transformations from source connection data. Now let's use these transformations to create another transformation
Name the transformation as "customerpayments".
In order for us to reference a previously created transformation, make sure to use the ref designation e.g. {{ ref('jaffleshop', 'payments') }}. In this example, you can see that we are referencing both the previously created "payments" and "orders" transformation
Compile the transformation.
Compile the transformations.
View results
Describe the transformation.
Save the transformation.
View all created trasformations