How to transform data
In Holistics, you can transform data by creating Transform Models. The general workflow is:
- Go to Data Modeling page, click Create -> Add Data Model from SQL
- Write a transformation SQL, validate & Save the model.
- Optional: Persist the model to the database to improve query performance, and set schedule to periodically run the transformation.
For example, we have a model called
order_master in which we pre-join
Query syntax depends entirely on the SQL flavor of your databases - Holistics only add a few syntax for model and field reference. For more details, please visit Data Modeling Syntax.
In Holistics, we encourage users to refactor your complex transformations into components that can be used in several places. Holistics can recognize the dependency between your models and determine the sequence of transformation.
In the following transformation, we reuse model
When you run this final query, Holistics will know that the transform model
order_master must be run first. If you save the query to a model called
user_facts_aggr, you can also have a dependency graph of all models involved:
Changes you made in upstream parent models will be carried downstream. If in model
orders_master we changed the definition of
gmv field and got different values, this change will reflect to