✅ What you’ll learn in this module:
- How to create models from your custom connector data
- How to clean, join, and enrich your data in SQL
- How to publish final tables for your BI tools
🧱 What is a model in Weld?
A model is a SQL transformation that takes raw data (like from your custom connector) and turns it into a clean, structured table — ready for analysis.
Models can:
- Rename or filter fields
- Join with other sources (like Stripe, Shopify, CRM data)
- Calculate metrics or transform formats
- Serve as the foundation for dashboards or reverse ETL
🛠 Step-by-step: Create a model
1. Go to Models → New Model
Name your model and choose the destination schema (e.g. analytics
).
2. Write your SQL
Here’s an example using a forms
table from your custom connector:
1select
2 id
3 , title
4 , created_at
5 , current_timestamp as synced_at
6from
7 custom_data.forms
8where
9 created_at >= date_sub(current_date(), interval 1 year)
You can write standard SQL with support for:
- Joins
- CTEs
- Date functions
- Case statements
3. Preview & validate
Use the Preview tab to test your query and make sure the output looks correct.
4. Save & schedule the model
Choose how often it should run — we recommend syncing models shortly after the underlying source syncs.
✅ Weld takes care of table creation, refresh logic, and dependency tracking.
🔄 Use models downstream
Once your model is published, you can:
- Query it directly in your warehouse
- Use it in BI tools like Looker Studio, Power BI, or Tableau
- Push it back into other tools via Reverse ETL
Next up
Connect to Weld
Make it production-ready with advanced features and best practices.
Go to module