Uploading a CSV file to BigQuery
Google Career Certificates
21 steps
2 minutes
Google Cloud
Who
Example: downloading a CSV file
Make sure you have a CSV file that you want to upload to BigQuery first. We'll use an example dataset (Global Health: Medical Doctors) in our instructions, but your dataset could be different.
1
Download a dataset as a CSV file - here is the example dataset we'll use: [https://apps.who.int/gho/data/node.main.HWFGRP_0020?lang=en](https://apps.who.int/gho/data/node.main.HWFGRP_0020?lang=en) Your dataset may be different!
Uploading your CSV file to BigQuery
2
Navigate to [https://console.cloud.google.com/bigquery](https://console.cloud.google.com/bigquery) and make sure you are signed in to your BigQuery account.
3
Click the project that you want to add the dataset into.
4
Click the Actions icon (three vertical dots) next to your project and select Create dataset to open the Create dataset options.
5
Enter a name for the Dataset ID. In this case, we'll name it 'medical_doctors' (your dataset will be named something else depending on the data contained in the CSV file).
6
Click Create dataset.
7
Click Go to dataset to navigate to the new dataset that you just created.
You haven't actually uploaded any data yet at this point, but you have created the dataset for the data table.
8
To prepare to upload the data in the CSV file, click Create table.
9
Click the drop-down menu under Source.
10
Select Upload to upload the CSV file from your computer or device.
11
Click Browse.
12
Select your downloaded CSV file from your device (your file path will vary). After you select your CSV file, the file format will automatically change to CSV.
13
Enter a name for your table. In this case, we'll name ours 'doctors_data' (your table will be named something else depending on the dataset).
14
Check the Schema and input parameters check box under Auto detect.
15
Click Create table. This uploads the data in the CSV file into the table.
Querying the data you uploaded
16
Click the name of your dataset under your project name - in our example, click "medical_doctors."
17
Click doctors_data.
18
Click the Query table icon.
19
Click within the editor box for the query.
20
Click RUN to run the query.
21
Click and drag up to resize the panel to see more results.
Uploading a CSV file to BigQuery
Google Career Certificates
21 steps
2 minutes
Google Cloud
Who
Example: downloading a CSV file
Make sure you have a CSV file that you want to upload to BigQuery first. We'll use an example dataset (Global Health: Medical Doctors) in our instructions, but your dataset could be different.
1
Download a dataset as a CSV file - here is the example dataset we'll use: [https://apps.who.int/gho/data/node.main.HWFGRP_0020?lang=en](https://apps.who.int/gho/data/node.main.HWFGRP_0020?lang=en) Your dataset may be different!
Uploading your CSV file to BigQuery
2
Navigate to [https://console.cloud.google.com/bigquery](https://console.cloud.google.com/bigquery) and make sure you are signed in to your BigQuery account.
3
Click the project that you want to add the dataset into.
4
Click the Actions icon (three vertical dots) next to your project and select Create dataset to open the Create dataset options.
5
Enter a name for the Dataset ID. In this case, we'll name it 'medical_doctors' (your dataset will be named something else depending on the data contained in the CSV file).
6
Click Create dataset.
7
Click Go to dataset to navigate to the new dataset that you just created.
You haven't actually uploaded any data yet at this point, but you have created the dataset for the data table.
8
To prepare to upload the data in the CSV file, click Create table.
9
Click the drop-down menu under Source.
10
Select Upload to upload the CSV file from your computer or device.
11
Click Browse.
12
Select your downloaded CSV file from your device (your file path will vary). After you select your CSV file, the file format will automatically change to CSV.
13
Enter a name for your table. In this case, we'll name ours 'doctors_data' (your table will be named something else depending on the dataset).
14
Check the Schema and input parameters check box under Auto detect.
15
Click Create table. This uploads the data in the CSV file into the table.
Querying the data you uploaded
16
Click the name of your dataset under your project name - in our example, click "medical_doctors."
17
Click doctors_data.
18
Click the Query table icon.
19
Click within the editor box for the query.
20
Click RUN to run the query.
21
Click and drag up to resize the panel to see more results.