Overview - source() function for raw tables
What is it?
The source() function in dbt is a way to refer to raw tables that exist outside of your dbt project. It helps you tell dbt where your original data lives before you transform it. This function creates a clear link between your raw data and the models you build on top of it. It also helps with documentation and testing of these raw tables.
Why it matters
Without the source() function, it would be hard to track where your raw data comes from and how it flows through your transformations. This can lead to confusion, errors, and difficulty in debugging. Using source() makes your data pipeline more transparent and reliable, which is crucial for making trustworthy decisions based on data.
Where it fits
Before learning source(), you should understand basic dbt models and how dbt runs SQL transformations. After mastering source(), you can learn about dbt tests, documentation, and advanced data lineage tracking.