Adding a snapshot
When working with your team, you learn about a new tangential dataset being added to the data warehouse. This dataset represents the set of vehicles that will be in use for a given taxi license. While a taxi is likely to be used for quite some time, it is possible that the license may be reassigned to a new vehicle during a given timeframe. One of your colleagues realizes this may cause issues with future reporting as a ride may not be represented by the proper vehicle.
The dataset looks like the following:
column_name | description |
---|---|
license_id | The numeric ID assigned to the taxi company |
vehicle_make | The manufacturer of the vehicle |
vehicle_model | The model of the vehicle |
vehicle_year | The year the vehicle was manufactured |
last_updated | Date when the record was last modified |
Looking at this information you realize this is a great time to implement snapshots using dbt. After discussing this with the team, your team lead asks you to implement the snapshot functionality in the nyc_yellow_taxi
project, using the source named 'raw.vehicle_list'.
This exercise is part of the course
Intermediate dbt
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
