Schedule

When publishing a model in the data Transform section you have the option to save your query as a materialised table or view.

The main difference between a SQL materialized table and a view is that a materialized table is a physical table that stores data persistently on disk, while a view is a virtual table that does not store data and retrieves it dynamically from underlying tables.

Materialized tables provide better query performance and allow direct data modifications, but will only be refreshed on a set schedule. A view simplifies query complexity and offer a dynamic representation of data without storing it separately.

When to use a view or a table?

If you have a large dataset you can reduce the query execution time and cost by materialising it as a table. You can control on a schedule how often this table is updated.

For a small dataset you can simplify your dependencies and have it update in real-time by materialising it as a view.

Publish model as a view

You can publish a model as a view by clicking the Publish button in the bottom right corner. When it's published, it will automatically be stored in your data warehouse as a view and moved to the Published pane in Weld.

Publish model as a table

You can publish a model as a view by clicking the Publish button in the bottom right corner. When it's published, it will automatically be stored in your data warehouse as a view and moved to the Published pane in Weld.

Update schedule

You can always update the schedule or materialisation type of a published model by going to the Schedule pane below the Transform editor and clicking Edit schedule.

Recreate table now

If you have a table, you can recreate it immediately instead of waiting on the next schedule window. This is handy when doing data modelling and you want to refresh the data.

Data warehouse reference

The structure in your data warehouse will always follow this convention: folder_name + . + model_name. In practice this is how it would look like: analytics.customer_growth.

In your data warehouse analytics is the top level folder/schema name and customer_growth is the name of the model.

In Weld you can also create sub-folders, which is handy when organising your data models. In Snowflake and BigQuery it is only possible to have one folder/schema level. In this case the convention looks like this: folder_name + . + sub_folder_name + __ + model_name. In practice it would look like this: analytics.marketing__customer_growth.

In your data warehouse analytics is the top level folder/schema name and marketing__customer_growth is the name of the model.

Here's an example of how you can query this table directly from your data warehouse:

select *
from `analytics`.`marketing__customer_growth`

You can always find the data warehouse reference in Weld under the Schedule tab.

Was this page helpful?