It’s a lot when you get in touch with the db as first right? Yeah, there are lots of component help to make dbt well functioned. So, please have a close look for the dbt project configuration file through the analogy of running a "taxi_rides_ny" taxi company:
name: 'taxi_rides_ny' # Company name (must be lowercase with underscores)
version: '1.0.0' # Current version number
profile: 'default' # Configuration profile type to use
model-paths: ["models"] # Folder for main business models
analysis-paths: ["analyses"] # Folder for analytical reports
test-paths: ["tests"] # Folder for test cases
seed-paths: ["seeds"] # Folder for basic data
macro-paths: ["macros"] # Folder for reusable functions
snapshot-paths: ["snapshots"] # Folder for data snapshots
Like having designated locations for different departments' files in the company.
target-path: "target" # Location for compiled SQL files (like a temporary workspace)
clean-targets: # Folders to delete during cleanup (like office cleaning)
- "target"
- "dbt_packages"
models:
taxi_rides_ny: # Your project name
example: # Models in the example folder
+materialized: table # Data will be stored in table format
This specifies that certain data needs to be permanently stored (table) rather than temporarily viewed (view).
Detailed Explanation:
materialized: table
means the data will be actually stored, like keeping taxi trip records in physical file cabinetsview
is more like a temporary data report, generated only when neededFor example:
This entire configuration file is telling dbt: