From the course: Data Engineering Foundations
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Solution: Data extraction
(upbeat music) - [Tutor] So let's look at how we could extract data from the users table. First of all, we had to provide the name of the table. So that was users. Then add the username, the password. The driver that we had to provide was the postgresql drivers, since we're using the postgresql database. So we could simply use the one that we used to extract movies table data. And then at the end, we need to print the user's data frame that we have just read, user underscore df. We would have to use the show function overhead and that's it. So once you run the script you would get the data for the users table. So as you can see we have id, movie underscore id and rating.
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.
Contents
-
-
-
-
-
-
Sources of data extraction4m 46s
-
Data extraction from a PostgreSQL database4m 51s
-
Challenge: Data extraction40s
-
Solution: Data extraction51s
-
Transforming data2m 3s
-
Challenge: Transforming data42s
-
Solution: Transforming data58s
-
Loading data into a DB4m 11s
-
Challenge: Loading data59s
-
Solution: Loading data1m
-
Scheduling ETL pipeline using Airflow9m 3s
-
-