Introducing the source and ref dbt functions
You have seen that in the dbt Cloud IDE, you can write any SQL and use the Preview button to execute it on the DB configured for your project. This is handy when you are exploring a dataset or perfecting a query, but it is just the tip of the iceberg.
In this section, we will look at the dbt default project and you will learn about the source
and ref
functions that are at the real core of how dbt works.
Exploring the dbt default model
Let’s list what the dbt default project contains:
README.md
: This is a text file with some instructions and pointers to the dbt documentationdbt_project.yml
: The main configuration file.gitignore
: A git-specific file that lists resources to exclude from VC, such as thedbt_packages
,target
, andlogs
folders- Inside the
models/example
folder, we have two models and a config file:my_first_dbt_model.sql
: As the name suggests, this is the first model, which is just made up of...