GCP BigQueryML – Easy ML Model using SQL Query

Citizen Data Scientists and Data Analysts who are comfortable with SQL query and don’t want to mess with other ML model building languages should prepare their ML Models using SQL queries.

Personally, I believe that there are a lot of folks who have their comfort level using SQL and get overwhelmed with anything new. Standard ANSI SQL can be used to build ML Models on BigQueryML.

Please check this video on my GCP channel for the steps to build ML Model using BigQueryML.

Here are the steps that I’ve used to build the BigQueryML model,

Step #1 – Load or utilize the existing data as your source dataset

Step #2 – Add a random value to create a split for test/train/evaluation within your dataset

Step #3 – Create an Input View with the labels of data records with Training, Evaluation, Prediction to be used for training and testing the source dataset

Step #4 – Build a model using the training dataset, in my case, I used Logistic Regression to solve the classification problem

Step #5 – Evaluate the ML Model

Step #6 – If the accuracy is good, and the model works fine, then use the model to predict the Prediction Dataset

Step #7 – Your Model is ready and is able to Predict. You can save this data and further explore in data studio

Please check BigQuery ML documentation from Google for further reading.

About the author

Munira Gandhi
Munira Gandhi

Munira Gandhi is a data & analytics practice manager at Miracle Software Systems, with over 16+ years of as Enterprise Information/Data architect focused on all data aspects (data ingestion, integration, analytics). She is AWS cloud architect certified and is working on Google GCP Data Engineer certification.

Specialties :
- Big Data Architecture and Strategy (Hadoop ecosystem; Google Bigquery)
- Data Science and Analytics (Python)
- Cloud
- Business Intelligence (Power BI, Tableau, Spotfire)
- Oil & Gas domain knowledge expert

Add comment

Munira Gandhi By Munira Gandhi
Welcome to Miracle's Blog

Our blog is a great stop for people who are looking for enterprise solutions with technologies and services that we provide. Over the years Miracle has prided itself for our continuous efforts to help our customers adopt the latest technology. This blog is a diary of our stories, knowledge and thoughts on the future of digital organizations.

For contacting Miracle’s Blog Team for becoming an author, requesting content (or) anything else please feel free to reach out to us at blog@miraclesoft.com.

Who we are?

Miracle Software Systems, a Global Systems Integrator and Minority Owned Business, has been at the cutting edge of technology for over 24 years. Our teams have helped organizations use technology to improve business efficiency, drive new business models and optimize overall IT.

Recent Posts