Data models

With data models in Weld, you can organise and structure your SQL queries so they can be easily accessed and analyzed. All published data models are automatically stored and synced to your data warehouse.

By using Weld Transform, you get access to a number of features on top of your data warehouse

  • Automatic data lineage
  • Version history
  • Orchestration and materialisation
  • Easy column and table referencing
  • Real-time collaboration
  • Ed Logo AI assistant and more

You have 3 different types of data models in Weld

  • Drafts
  • Published and materialised as a view
  • Published and materialised as a table

Create a draft

You can save a model without publishing it to your data warehouse by creating a draft. If you save the draft and give it a name, it will be saved until you delete it.

Delete a draft

You can delete a draft from the left hand Drafts pane. Since drafts are not stored in the data warehouse, this will only remove the draft in Weld.

Publish model

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

Reference models

An important part of Weld is how you reference other tables and views in our data Transform. All references should be with with double curly brackets like this {{ecommerce.customer_growth}}. Here is how this looks in practice:

select *
from {{ecommerce.customer_growth}}

Under the hood, this enables a variety of functionality like automatic dependency graphs and orchestration. It also enhances the Transform editor with metadata for columns and types like this:

Auto-saving

When you edit a published model, all your changes are automatically saved in an edited version. The edited version will not be reflected in your data warehouse until you publish the model again with the new changes. You can see if a model has any unpublished updates in the top right corner of the Transform editor.

If you click on the edited button, you will see the version history of the model. You can at any time reset the model to any previous version and also see who made the latest changes.

Format models

You can format your SQL by using the auto-format feature. This ensures that your SQL is streamlined across your workspace. You can also access this with the keyboard shortcut cmd/ctrl + ⇧ + F.

Was this page helpful?