From the course: Data Science on Google Cloud Platform: Designing Data Warehouses

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Google Cloud shell

Google Cloud shell

From the course: Data Science on Google Cloud Platform: Designing Data Warehouses

Start my 1-month free trial

Google Cloud shell

- [Instructor] All the operations that are done through the UI in BigQuery can also be done through the command line. In this case, I'm going to use Google Cloud Shell to run a query called SELECT * FROM PatientData.Patient_all WHERE pl.smoke equal to zero, so I'm selecting all the non-smokers and the result of this query I'm storing to a destination table called PatientData.non_smoker_data. I'm also setting the use legacy SQL to true, and when I execute this command, it is going to run, give me the results, and also create this table for me. This is very useful when you are to build some scripts for doing repetitive jobs, so let me run the command now, and you can see that the job has been created and running. Here are the results. We go to the BigQuery window, refresh the window, and you will see that the non_smoker_data table has now been created, and you can look at the data of what has been created for you.

Contents