Notebooks with Colab Enterprise
Associate Data Practitioner · Lesson 6 of 16 · 39:53
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Google Cloud Associate Data Practitioner exam, on the official exam guide. In this lesson: Jupyter notebooks and Colab Enterprise, runtimes, templates and sharing, BigQuery DataFrames, and when to choose a notebook rather than SQL or a dashboard. Includes three original practice questions, with Cymbal Energy, a fictional electricity and gas supplier, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Exploring, not reporting
An analyst at Cymbal Energy wants to explore how the outside temperature drives gas consumption: query the data, plot it, try a few ideas, and explain the result to colleagues. SQL alone is not enough, and a dashboard is too rigid for this kind of exploration. This is the job of a notebook.
Notebooks and Colab Enterprise
A Jupyter notebook mixes code, results, charts, and text in one document, made of cells that you run one at a time. Colab Enterprise is Google Cloud's managed notebook service, and it is built into BigQuery Studio. A notebook can mix SQL cells and Python cells, and hand the result of a query to Python as a data frame. Charts come from familiar libraries, like matplotlib, right under the code that drew them.
Runtimes and sharing
Colab Enterprise starts a runtime for you when you run a notebook, and shuts it down when it sits idle, so there is no server to manage. A runtime template sets the machine type, accelerators, and disk, for notebooks that need more power. Notebooks are shared with Identity and Access Management, with a user or a group, and they keep a version history. And a notebook run can be scheduled, once or on a regular basis.
BigQuery DataFrames
Data in BigQuery can be far larger than a runtime's memory. BigQuery DataFrames is an open source Python library with APIs in the style of pandas and scikit-learn, and it turns your code into work that runs in BigQuery, so terabytes are processed there, not in the runtime. Plain pandas, by contrast, downloads the data into the runtime's memory, which only works for small results. So aggregate or sample in BigQuery first, and bring only a small result into the notebook to plot it.
When to choose a notebook
So when is a notebook the right tool? For exploration, statistics, and machine learning experiments in Python, and to tell the story of an analysis, with code, charts, and text together. For a recurring report that many people read, a dashboard is better. And for a transformation that must run every day in production, prefer a scheduled query, Dataform, or a pipeline.
Recap
Let's recap. A Jupyter notebook mixes code, results, charts, and text, cell by cell. Colab Enterprise is the managed notebook service, built into BigQuery Studio, with SQL and Python cells. Runtimes start and stop for you, templates size them, and notebooks are shared with Identity and Access Management, and can be scheduled. BigQuery DataFrames runs pandas-style code inside BigQuery, while plain pandas works in the runtime's memory. And notebooks suit exploration, while dashboards suit recurring reports.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
An analyst built a notebook in BigQuery Studio. The three colleagues of the forecasting group must open and run it, with no files sent by email. What should the analyst do?
- Share the notebook with the forecasting group
- Download the notebook file and email it
- Give the group the basic owner role
- Export the results to a spreadsheet
Show the answer
Share the notebook with the forecasting group
Sharing the notebook with the forecasting group through Identity and Access Management gives them the same notebook, with its history. “Download the notebook file and email it” would create copies that drift apart, outside any access control. “Give the group the basic owner role” is far too broad for opening one notebook. And “Export the results to a spreadsheet” only sends results, with no code to run.
A notebook must compute statistics over two terabytes of readings, but the runtime has far less memory, and the analyst prefers Python in the style of pandas. What should be used?
- Plain pandas, reading the whole table
- A runtime template with more memory
- BigQuery DataFrames
- A CSV export opened in a spreadsheet
Show the answer
BigQuery DataFrames
BigQuery DataFrames keeps the pandas style, and runs the work in BigQuery, so the terabytes never fill the runtime. “Plain pandas, reading the whole table” would download the whole table into a memory far too small for it. “A runtime template with more memory” would still try to hold terabytes on a single machine. And “A CSV export opened in a spreadsheet” would hit the limits of a spreadsheet long before two terabytes.
Every morning, two hundred regional managers need the same consumption figures, with filters by region, and none of them writes code. What fits best?
- A notebook shared with every manager
- A dashboard
- A script that emails CSV files
- A saved query that each manager runs
Show the answer
A dashboard
A dashboard serves the same figures to many readers, with filters, and no code. “A notebook shared with every manager” would ask managers who do not write code to run notebook cells. “A script that emails CSV files” would only send files that nobody can filter. And “A saved query that each manager runs” would ask every manager to run SQL by hand.