From the course: Data Engineering with dbt
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Import CSV data into your new database - Data Build Tool (dbt) Tutorial
From the course: Data Engineering with dbt
Import CSV data into your new database
- [Instructor] We now have our DuckDB database set up and it's now time to put data within our database. Now I'm going to copy and paste some code in here. We will provide that code to you, so you don't have to worry about typing all of this yourself, but I'm going to go quickly break down how this code works and then how it looks like in DuckDB. I'm going to zoom out a little bit, so you can see the total code itself, but we'll make sure to reset it. So we have our two SQL queries and then we run the individual SQL queries with the with statement. One thing I want to highlight is there's various ways to run the DBT SQL code. The reason why I like using with is because after this cell is done running, it will automatically close out the database. This may not seem important now, but when we're doing iterations of development for DBT, we are going to have to connect to the database from DBT, the Jupyter Notebook back and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.