Data Build Tool Challenge - Basics

Lab Steps

lock
Data Build Tool Challenge - Basics
lock
Data Build Tool Challenge - Data Modeling
lock
Data Build Tool Challenge - Data Testing
Need help? Contact our support team

Here you can find the instructions for this specific Lab Step.

If you are ready for a real environment experience please start the Lab. Keep in mind that you'll need to start from the first step.

Your Mission

You must complete several tasks using the Data Build Tool skills you've learned. You will be given a desired end state and you need to achieve that state on your own. Once you believe you have the desired state you will be able to validate your progress.

You are a Data Engineer that recently joined a fast-growing startup to organize the data team. The startup is focused on monitoring credit card online transactions in order to notify people when a possible fraud is happening. So, the company needs to work with tons of data.

You will start working on a new project soon, and your manager is looking for a technology that allows data analysts and data engineers easily and efficiently model and transform data. You have proposed Data Build Tool (dbt) because you've already worked with it, but your manager haven't heard about it. After a quick check of the tool, your manager asked you to make a small project in order to show the potential of this tool.

 

Instructions

1. The in-browser development environment is starting up while you see Setup in progress on the Validation Steps tab.

It takes approximately 1 minute for the development environment to startup at which point you can begin writing code in the IDE.

 

2. Once the IDE setup is complete, click the left Explorer tab to reach the files you will start coding from:

alt

Note: You can maximize the IDE by clicking alt in the upper-right corner of this lab.

 

3. Click the Go to Validation Steps button below to perform the tasks and complete the challenge. When you are ready, click alt to check your solution.

Validation checks
2Checks
Defining the dbt Sources

As the first thing, you have to declare the dbt sources you are going to use in the dbt project.

The source database you are working on has the following source tables.

Your manager required you to work and model over the employees, orders, order details, and products sources, so you need to define them as the sources for the dbt project. Name the source file as sources.yml and insert it under the models folder.

Notes

  • The order details table has to be referenced as order_details.
Data build tool (dbt)
Defining the dbt Staging Models

Now that the sources have been declared, you have to show your manager how to declare base models that map the sources you want to use in your dbt project.

So, you have to define staging models for each source you have declared. You have to insert the models into a staging folder within the models folder.

Notes

  • Remember to name the dbt model files by using plural names. So a staging model mapping the customer source would be named stg_customers.
  • Name the order details staging table as stg_order_details.sql
  • Remember to materialize the models as table.
Data build tool (dbt)