Connecting with files

DataLab with SQL

Jasmin Ludolf

Senior Data Science and AI Content Developer, DataCamp

Instructor & DataLab enthusiast

$$

Profile photo of the instructor: Jasmin Ludolf

DataLab with SQL

Our learning journey

$$

Follows on from Introduction to DataLab

  • Explore and Chart cells
  • AI features
  • Accessing data and files

$$

We'll focus on using SQL with DataLab

$$

GIF from Introduction to DataLab on using Explore cells

DataLab with SQL

Environments

$$

DataLab environment drop down showing the SQL cell options within the workbook

$$

                               SQL cells are available in both Python and R environments

DataLab with SQL

Connecting files on DataLab

$$

  • No need for installations or databases
  • For advanced techniques, check out the documentation
  • We'll connect Google Sheets and CSV files

Illustration of digital files that resemble CSV files

DataLab with SQL

Connecting a data source

GIF of DataLab showing the new data source button

DataLab with SQL

Connecting a data source

GIF on DataLab showing connecting a Google Sheet

DataLab with SQL

Querying a Google Sheet

Querying a Google Sheet:

SELECT *
FROM 'Sheet1';

$$

Standard SQL query for tables:

SELECT *
FROM table_name;
DataLab with SQL

Connecting a CSV file

GIF of DataLab showing a CSV file being dragged into a new workbook

DataLab with SQL

Connecting a CSV file

GIF on DataLab showing where there workbook files are

DataLab with SQL

Querying a CSV file

Automatically generated query:

SELECT *
FROM 'data.csv';

$$

This also works:

SELECT *
FROM data.csv;
DataLab with SQL

Explore cells

GIF of Explore and Chart cells using the sales data

DataLab with SQL

Let's practice!

DataLab with SQL

Preparing Video For Download...