Study guide

6.1 Exploratory Analysis with Jupyter & Colab Enterprise

Google Cloud Associate Data Practitioner Exam

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

About the Associate Data Practitioner Exam

2 Chapter 1: Data Processing Paradigms & Ingestion Strategies

1.1 ETL, ELT, and ETLT Transformation Paradigms 1.2 Data Transfer and Migration Tools 1.3 Data Quality, Cleaning, and Validation

3 Chapter 2: Data Formats & Storage Solution Selection

2.1 File Formats & Serialization Characteristics 2.2 Cloud Storage Buckets, Location Types & Storage Classes 2.3 Selecting Google Cloud Databases and Storage Services

4 Chapter 3: Loading Data & Modern Ingestion Architectures

3.1 Batch Loading Data into BigQuery 3.2 Streaming Ingestion & Deduplication Patterns 3.3 BigQuery External Tables, BigLake & Federated Queries 3.4 Schema Definition & Evolution for Loaded Data

5 Chapter 4: BigQuery SQL Analytics & Query Foundations

4.1 BigQuery SQL Syntax & Analytical Functions 4.2 Complex Data Types: Arrays, Structs, and JSON 4.3 Answering Business Questions with BigQuery: Worked Analyses

6 Chapter 5: BigQuery Performance Optimization & Cost Governance

5.1 Table Partitioning Strategies 5.2 Table Clustering & Data Skipping 5.3 Query Optimization, Execution Plans, and Cost Controls

7 Chapter 6: Interactive Analysis, Notebooks & Visual Presentation

6.1 Exploratory Analysis with Jupyter & Colab Enterprise 6.2 Looker Studio (Data Studio) Reporting & Dashboard Design 6.3 Enterprise BI with Looker & LookML Foundations 6.4 Building, Modifying & Sharing Looker Dashboards

8 Chapter 7: Machine Learning with BigQuery ML & Vertex AI

7.1 Planning an ML Project: BigQuery ML, AutoML, or Pretrained Models? 7.2 Creating, Training & Evaluating Models with BigQuery ML 7.3 Running Inference and Organizing Models in Model Registry 7.4 Using Pretrained Gemini Models from BigQuery with Remote Connections

9 Chapter 8: Pipeline Engines & Transformation Services

8.1 Transformation Engine Selection Matrix 8.2 Apache Beam & Cloud Dataflow Core Concepts 8.3 Stream Processing: Windowing, Watermarks, and Triggers

10 Chapter 9: Workflow Orchestration, Automation & Monitoring

9.1 SQL Pipelines with Dataform & Scheduled Queries 9.2 Workflow Orchestration with Cloud Composer & Workflows 9.3 Event-Driven Ingestion: Pub/Sub to BigQuery & Eventarc Triggers 9.4 Monitoring Pipelines: Dataflow Job UI, Cloud Logging & Cloud Monitoring

11 Chapter 10: Access Control, Governance & Data Sharing

10.1 IAM Principles & Role Hierarchies for Data Services 10.2 Cloud Storage Security & Access Controls 10.3 Fine-Grained Security: Column-Level & Row-Level Controls 10.4 Secure Data Sharing with Analytics Hub (BigQuery Sharing)

12 Chapter 11: Lifecycle Management, Reliability & Compliance

11.1 Object Lifecycle Management & Storage Tiering 11.2 High Availability & Disaster Recovery Architectures 11.3 Data Retention, Time Travel, and Point-in-Time Recovery 11.4 Encryption Key Management & Privacy Compliance

6.1 Exploratory Analysis with Jupyter & Colab Enterprise

Key Takeaways Explain This Topic AI

Colab Enterprise provides a managed, serverless Jupyter notebook environment integrated into Vertex AI and BigQuery Studio, delivering enterprise-grade IAM, VPC Service Controls, and CMEK without virtual machine management.

Vertex AI Workbench instances, the current Workbench offering (user-managed and managed notebooks are deprecated), run JupyterLab on Compute Engine VMs for work that needs custom containers, OS-level control, or GPUs.

The %%bigquery magic command enables direct SQL query execution from notebook cells into client-side Pandas DataFrames, but risks Out-Of-Memory (OOM) errors when materializing massive result sets into local runtime RAM.

BigQuery DataFrames (bigframes.pandas and bigframes.ml) translates Pandas and Scikit-Learn code directly into distributed BigQuery SQL jobs, allowing data practitioners to manipulate terabytes of data using familiar Python APIs without client-side memory bottlenecks.

Cloud security best practices mandate using runtime service accounts with least-privilege IAM permissions and Google Cloud Application Default Credentials (ADC), strictly prohibiting hardcoded service account keys or credentials in notebook code.

Last updated: October 2026

Exploratory Analysis with Jupyter & Colab Enterprise

Core Focus: Interactive notebooks serve as the primary workbench for data practitioners conducting exploratory data analysis (EDA), data science prototyping, and statistical modeling on Google Cloud. Understanding the architectural distinctions between serverless Colab Enterprise and dedicated Vertex AI Workbench instances—alongside knowing when to use client-side Pandas versus server-side BigQuery DataFrames—is central to enterprise cloud analytics.

Modern data practitioners do not work exclusively in batch pipelines or static SQL consoles. High-impact analytics requires an agile, iterative workflow: exploring data distributions, identifying outliers, validating hypotheses, testing transformation logic, and generating statistical charts. In Google Cloud, Jupyter notebooks provide this interactive computing environment. However, deploying notebooks in enterprise settings introduces strict requirements around security governance, scalable compute, access control, and seamless data warehouse integration.

The Role of Interactive Notebooks in Data Workflows

Interactive computational notebooks combine runnable code, formatted Markdown prose, mathematical equations, and rich data visualizations into a single reproducible document. Within Google Cloud data architectures, notebooks fulfill three essential operational functions:

Exploratory Data Analysis (EDA): Before building production ETL/ELT pipelines or training machine learning models, practitioners must inspect raw datasets. Notebooks enable rapid calculation of summary statistics (mean, median, standard deviation, interquartile ranges), missing value profiling, correlation analysis, and data quality inspection.

Pipeline Prototyping: Developing complex data transformation logic directly inside scheduled production orchestrators (such as Cloud Composer or Dataform) is slow and difficult to debug. Data practitioners use notebooks to prototype SQL queries, test Python filtering logic, and validate schema assumptions against small sample sets before promoting logic to production repositories.

Statistical Analysis and Ad-Hoc Visualization: Business stakeholders frequently request targeted, non-standard statistical investigations—such as customer churn cohort behavior, revenue seasonality regressions, or anomaly detection in sensor telemetry. Notebooks allow practitioners to pair ad-hoc BigQuery extractions with Python visualization libraries to deliver rapid analytical answers.

Google Cloud Notebook Environments: Colab Enterprise vs. Vertex AI Workbench

Google Cloud provides two distinct architectures for running Jupyter notebooks: Colab Enterprise and Vertex AI Workbench . +-----------------------------------------------------------------------------------------+

  • | Google Cloud Notebook Environments |
  • +---------------------------------------------+-------------------------------------------+
  • | Colab Enterprise | Vertex AI Workbench |
  • | (Serverless, Collaborative, Zero-Admin) | (Dedicated Compute Engine Instances) |
  • +---------------------------------------------+-------------------------------------------+
  • | - Built into BigQuery Studio & Vertex AI | - Workbench instances (current offering) |
  • | - Instant runtime startup (serverless) | - Full root (sudo) and OS-level access |
  • | - Shared through IAM; version history | - Custom Docker containers & pip packages |
  • | - Native IAM, VPC-SC, and CMEK governance | - Dedicated NVIDIA GPUs / Google TPUs |
  • | - Zero virtual machine infrastructure mgmt | - Persistent local SSDs and NVMe storage |
  • +---------------------------------------------+-------------------------------------------+
  • 1. Colab Enterprise

Colab Enterprise brings the familiar, user-friendly interface of Google Colaboratory into a fully governed enterprise environment. Deeply integrated into both Vertex AI and BigQuery Studio , it is designed for data analysts, data scientists, and business practitioners who require rapid interactive computing without operational overhead.

Serverless Compute Model: Users do not provision, configure, or patch Compute Engine virtual machines. Google dynamically provisions and manages the underlying execution runtime, spinning up computational resources on demand and releasing them when idle.

Sharing: Notebooks are shared through IAM, so teammates can open, run, and extend the same notebook, and BigQuery Studio keeps version history for saved notebooks.

BigQuery Studio Integration: Analysts working in BigQuery Studio can transition from writing pure SQL queries to executing a Python notebook with a single click, allowing immediate Python-based statistical processing on query results.

Enterprise Security & Compliance: Unlike commercial public Colaboratory, Colab Enterprise adheres strictly to corporate security perimeters. It integrates natively with Cloud IAM for access control, supports VPC Service Controls (VPC-SC) to prevent data exfiltration, encrypts notebook storage with Customer-Managed Encryption Keys (CMEK) , and respects private IP networking rules.

2. Vertex AI Workbench

Vertex AI Workbench provides dedicated, customizable development environments built on top of Google Compute Engine (GCE) virtual machines. Workbench is targeted at advanced data engineers and machine learning practitioners who require specialized runtime environments, heavy local computing power, or deep operating system customization.

Today the Workbench offering is Vertex AI Workbench instances (listed as Workbench on Gemini Enterprise Agent Platform since the April 2026 rename). An instance is a JupyterLab environment on a Compute Engine VM that you size and configure: machine type, GPUs, custom container images, extensions, and an idle-shutdown timer. The older user-managed notebooks and managed notebooks offerings are deprecated: support for user-managed notebooks ended on April 14, 2025, and remaining instances were converted to plain Compute Engine VMs on March 30, 2026. Exam answers that recommend those two legacy flavors describe products you can no longer create.

Architectural Comparison Matrix

  • Architectural Dimension Colab Enterprise Vertex AI Workbench instances
  • Infrastructure Model Managed runtimes; no VM administration A Compute Engine VM per instance

Where You Open It BigQuery Studio or the Agent Platform (Vertex AI) console Agent Platform (Vertex AI) console, JupyterLab

Customization Runtime templates (machine type, GPU, network) Custom containers, OS packages, JupyterLab extensions

  • Hardware Standard CPU and GPU runtime options Wide choice of machine types and GPUs
  • Sharing IAM-based notebook sharing and version history Files on the instance; Git integration
  • Idle Cost Control Runtimes shut down when idle Configurable idle shutdown
  • Typical User Analysts and data scientists working with BigQuery ML engineers who need a customized environment
  • Seamless BigQuery Integration with Notebooks

Data practitioners rarely store massive datasets directly on a notebook's local virtual disk. Instead, datasets reside in Google BigQuery. Google Cloud provides two primary mechanisms for interacting with BigQuery from a notebook: the %%bigquery IPython magic and the BigQuery DataFrames ( bigframes ) library .

1. The %%bigquery IPython Magic Command

The %%bigquery magic command is part of the google-cloud-bigquery library. It allows practitioners to write native standard ANSI SQL directly inside a Jupyter notebook cell. The query executes inside BigQuery's distributed Dremel engine, and the resulting tabular output can be displayed inline or materialized into a local Pandas DataFrame for downstream Python processing. # Executing a parameterized BigQuery query and storing results in a Pandas DataFrame

  • %%bigquery sales_df --params {"region": "EMEA", "min_revenue": 10000.0}
  • SELECT
  • customer_id,
  • country,
  • SUM(order_total) AS total_customer_spend,
  • COUNT(order_id) AS total_orders
  • FROM
  • `my_project.retail_dw.orders`
  • WHERE
  • region = @region
  • GROUP BY
  • customer_id, country
  • HAVING
  • total_customer_spend >= @min_revenue
  • ORDER BY
  • total_customer_spend DESC;
  • The Critical Client-Side Memory Trap

While %%bigquery is convenient, data practitioners must understand where computation and storage occur:

BigQuery processes the SQL query across its massively parallel slot infrastructure.

However, when you name a destination variable (here sales_df ), the full result set is downloaded and materialized in the notebook runtime's RAM as a pandas DataFrame.

If a query returns 50 million rows, attempting to load that volume into a standard Pandas DataFrame will exhaust the notebook runtime's memory, triggering an abrupt Out-Of-Memory (OOM) kernel crash .

Best Practice: Use %%bigquery primarily for aggregated results, statistical summaries, or filtered subsets (e.g., < 500,000 rows). Avoid executing unconstrained SELECT * queries against multi-terabyte fact tables using IPython magics.

2. BigQuery DataFrames ( bigframes )

To overcome client-side memory limitations, Google Cloud introduced BigQuery DataFrames ( bigframes ) . BigQuery DataFrames is an open-source Python library that implements the familiar APIs of Pandas ( bigframes.pandas ) and Scikit-Learn ( bigframes.ml ) .

Unlike traditional Pandas, which requires all data to reside in the local machine's memory, BigQuery DataFrames implements transparent query pushdown :

When a practitioner writes df.groupby('country').mean() , bigframes does not download the dataset to the notebook.

Instead, the bigframes compiler translates the Python DataFrame operations into highly optimized, distributed standard SQL.

That SQL is executed directly inside BigQuery's engine across petabytes of data.

Only the final evaluated output or visualization sample is returned to the client. import bigframes.pandas as bpd

  • # Set BigQuery project and regional compute location
  • bpd.options.bigquery.project = "my-enterprise-project"
  • bpd.options.bigquery.location = "US"
  • # Read directly from a multi-terabyte BigQuery table (zero local memory consumed)
  • orders_bdf = bpd.read_gbq("my-enterprise-project.retail_dw.ecommerce_transactions")
  • # Standard Pandas syntax translated to distributed BigQuery SQL behind the scenes
  • high_value_orders = orders_bdf[orders_bdf["transaction_amount"] > 250.0]
  • regional_summary = high_value_orders.groupby("store_region").agg({
  • "transaction_amount": ["count", "mean", "sum"],
  • "tax_amount": "sum"
  • })
  • # Computation executes in BigQuery; only the compact summary table is retrieved
  • print(regional_summary.head(10))
  • BigQuery DataFrames for Machine Learning ( bigframes.ml )

In addition to data manipulation, bigframes.ml implements Scikit-Learn-compatible interfaces for machine learning. Data practitioners can instantiate algorithms such as LinearRegression , LogisticRegression , KMeans , or PCA , call .fit() and .predict() , and have the entire training and inference workload executed via BigQuery ML (BQML) without exporting data to Python worker nodes. +-----------------------------------------------------------------------------------------+

  • | Pandas vs. BigQuery DataFrames (bigframes) |
  • +---------------------------------------------+-------------------------------------------+
  • | Standard Pandas (Local RAM) | BigQuery DataFrames (bigframes) |
  • +---------------------------------------------+-------------------------------------------+
  • | 1. Query downloads all rows to notebook | 1. Points to BigQuery table metadata |
  • | 2. Stored entirely in local VM/client RAM | 2. Operations converted to distributed SQL|
  • | 3. Single-threaded CPU execution | 3. Scaled across thousands of Dremel slots|
  • | 4. Crashes with Out-Of-Memory on >1-10 GB | 4. Scales smoothly to Terabytes/Petabytes |
  • +---------------------------------------------+-------------------------------------------+
  • Exploratory Data Visualization in Notebooks

Visual inspection allows data practitioners to identify distributions, skewness, seasonality, and correlations that summary metrics like mean and variance might obscure. Within Google Cloud notebook environments, three core Python libraries dominate:

Matplotlib: The foundational low-level plotting engine in Python. Used for rendering static line graphs, bar charts, and histograms. Highly customizable, though verbose.

Seaborn: Built on top of Matplotlib, Seaborn provides high-level abstractions designed specifically for statistical visualization. It excels at generating box plots, violin plots, kernel density estimates (KDE), and correlation matrix heatmaps.

Plotly: A dynamic, interactive graphing library. Renders HTML5/WebGL charts allowing practitioners to zoom, pan, hover over data points to inspect metadata, and filter series dynamically without re-executing notebook cells.

The Data Density and Sampling Pattern

Attempting to plot a scatter plot of 100 million raw points in Matplotlib or Plotly will freeze the browser tab and exhaust notebook memory. Modern cloud visualization follows two scalable architectural patterns:

Pattern A: Server-Side Aggregation: Push the heavy aggregation to BigQuery first. Calculate histograms, binned counts, or percentiles in SQL, then plot the compact binned result.

Pattern B: Sampling: Use TABLESAMPLE SYSTEM (1 PERCENT) , which quickly samples storage blocks (not individual rows), or a hash filter such as MOD(ABS(FARM_FINGERPRINT(user_id)), 100) = 0 , which keeps a repeatable 1% of users, to bring a small sample into memory for scatter plots and curve fitting. import matplotlib.pyplot as plt

import seaborn as sns

  • # Visualizing a sampled distribution extracted from BigQuery
  • plt.figure(figsize=(10, 6))
  • sns.histplot(sales_df['total_customer_spend'], bins=50, kde=True, color='royalblue')
  • plt.title("Customer Spend Distribution (Aggregated Sample)")
  • plt.xlabel("Total Spend ($USD)")
  • plt.ylabel("Frequency")
  • plt.grid(True, linestyle="--", alpha=0.6)
  • plt.show()
  • Security, IAM, and Credential Governance

Enterprise data notebooks have direct access to sensitive organizational datasets. Establishing rigorous identity and access boundaries is mandatory.

1. The Ban on Hardcoded Credentials

A severe security anti-pattern is downloading service account private keys ( service-account-key.json ) and referencing them inside notebook files or checking them into Git repositories: # CRITICAL SECURITY ANTI-PATTERN: NEVER DO THIS IN ENTERPRISE NOTEBOOKS

  • from google.oauth2 import service_account
  • credentials = service_account.Credentials.from_service_account_file("/path/to/key.json")

Hardcoded keys risk accidental exposure in version control, bypassing corporate session revocation policies and triggering automated security compliance alerts.

2. Runtime Service Accounts & Application Default Credentials (ADC)

The recommended Google Cloud security model relies on Runtime Service Accounts and Application Default Credentials (ADC) :

When a Colab Enterprise runtime or Vertex AI Workbench instance is created, administrators attach a dedicated Google Cloud Service Account to the underlying compute instance.

Any Google Cloud client library (such as google.cloud.bigquery or bigframes ) running inside the notebook automatically discovers and exchanges credentials with the instance metadata server via ADC.

No keys are stored on disk, and credentials rotate automatically every hour.

3. Principle of Least Privilege

The attached service account must only possess the exact IAM roles required for the analytical task:

roles/bigquery.jobUser : Grants permission to run BigQuery queries and create jobs within the project.

roles/bigquery.dataViewer : Grants read-only access to query specific datasets and tables without permitting table deletion or schema modification.

roles/bigquery.dataEditor : Granted only if the notebook is designated to write curated staging tables back to BigQuery.

Broad administrative roles—such as roles/owner , roles/editor , or roles/bigquery.admin —must never be assigned to interactive notebook service accounts.

4. Network Perimeter Security (VPC Service Controls)

In highly regulated environments (finance, healthcare), organizations deploy VPC Service Controls (VPC-SC) around BigQuery, Cloud Storage, and Vertex AI. VPC-SC establishes a cryptographic and network security perimeter around cloud resources, preventing data exfiltration even if an authenticated insider possesses valid IAM credentials but attempts to copy data to an unauthorized external storage bucket.

Common Exam Traps and Scenarios

Exam Tip: Pay close attention to data scale and operational overhead in notebook questions. If an enterprise requires data scientists to manipulate a multi-terabyte BigQuery dataset using Pandas operations without provisioning infrastructure or running out of memory, BigQuery DataFrames ( bigframes ) is the correct answer—not increasing the virtual machine RAM of a Workbench instance.

Trap 1: Client-Side Materialization vs. BigQuery DataFrames Pushdown

The Trap: Recommending scaling up a Compute Engine virtual machine to 128 GB of RAM to resolve memory crashes when using %%bigquery df on a 500 GB dataset.

The Reality: Scaling up client VM hardware is extraordinarily expensive and fails as data scales. The cloud-native architectural solution is to adopt bigframes.pandas , which delegates the computation to BigQuery's scalable slots and only returns small aggregated result sets.

Trap 2: Selecting Workbench for Serverless, Collaborative Exploration

The Trap: Recommending Vertex AI Workbench instances for a team of business SQL analysts who need to collaborate on BigQuery exploratory analysis without infrastructure overhead.

The Reality: Workbench instances are VMs you size, configure, and shut down. Colab Enterprise inside BigQuery Studio gives managed runtimes, IAM-based sharing, and no VMs to administer.

Trap 3: Embedding Static Service Account Keys

The Trap: Answering that data practitioners should generate and download a JSON service account key to authenticate their Colab Enterprise notebook to BigQuery.

The Reality: Google Cloud identity best practice strictly forbids static service account keys in notebooks. Notebooks should authenticate transparently using the instance's attached runtime service account via Application Default Credentials (ADC).