Building CLV Models with BigQuery ML in Vertex AI Workbench

PMLE By islever Editorial Last updated

Building AI solutions using Google Cloud AI APIs or foundational models. Model prototyping using notebooks (e.g., Gemini Enterprise Agent Platform Workbench and Colab Enterprise).

Short answer

D Create a Vertex AI Workbench notebook to perform exploratory data analysis, use IPython magics to create input features and the model, and validate results within the same environment.

Question

You work for a company that sells corporate electronic products to thousands of businesses worldwide. Your company stores historical customer data in BigQuery. You need to build a model that predicts customer lifetime value over the next three years. You want to use the simplest approach to build the model and you want to have access to visualization tools. What should you do?
  1. Create a Vertex AI Workbench notebook to perform exploratory data analysis. Use IPython magics to create a new BigQuery table with input features. Use the BigQuery console to run the CREATE MODEL statement. Validate the results by using the ML.EVALUATE and ML.PREDICT statements.
  2. Run the CREATE MODEL statement from the BigQuery console to create an AutoML model. Validate the results by using the ML.EVALUATE and ML.PREDICT statements.
  3. Create a Vertex AI Workbench notebook to perform exploratory data analysis and create input features. Save the features as a CSV file in Cloud Storage. Import the CSV file as a new BigQuery table. Use the BigQuery console to run the CREATE MODEL statement. Validate the results by using the ML.EVALUATE and ML.PREDICT statements.
  4. Create a Vertex AI Workbench notebook to perform exploratory data analysis. Use IPython magics to create a new BigQuery table with input features, create the model, and validate the results by using the CREATE MODEL, ML.EVALUATE, and ML.PREDICT statements. Correct Answer

Key Takeaways

The trap is confusing 'simplest' with 'AutoML' or 'Console-only'; the correct path integrates EDA, modeling, and viz into one notebook workflow using BQML SQL statements.

To build a Customer Lifetime Value model simply with visualization capabilities, use Vertex AI Workbench notebooks to run BigQuery ML commands directly via IPython magics.

Common mistake: Choosing Option B because AutoML is perceived as simpler, but it fails the visualization requirement and misapplies the `CREATE MODEL` syntax for AutoML workflows.

Expert Analysis

The question imposes two primary constraints: the model must be built using the simplest approach, and the user requires access to visualization tools.

First, analyze the modeling approach. The prompt specifies using BigQuery ML (BQML). BQML offers two main modes: standard SQL CREATE MODEL statements and AutoML tables. While AutoML is often considered 'simple' for feature engineering, it does not support direct prediction of Customer Lifetime Value (CLV) via standard BQML AutoML interfaces in the same straightforward manner as regression models created via SQL. More importantly, Option B suggests running CREATE MODEL from the console to create an AutoML model. This phrasing is technically contradictory; you do not run CREATE MODEL SQL commands to trigger AutoML UI workflows. Furthermore, the BigQuery Console itself lacks native, comprehensive visualization tools for EDA or model inspection compared to a notebook environment.

Next, evaluate the workflow simplicity and visualization requirements. Options A, C, and D all involve Vertex AI Workbench notebooks. Notebooks provide powerful visualization libraries (Matplotlib, Seaborn), satisfying the 'access to visualization tools' constraint. Option C involves exporting data to CSV and re-importing, which adds unnecessary complexity and latency, violating the 'simplest approach' constraint.

Between A and D, we look at the execution flow. Option A separates the feature creation (%%bigquery magic to create a table) from the model training (CREATE MODEL in the console). This splits the workflow between the notebook and the web console. Option D keeps the entire lifecycle—EDA, feature creation via IPython magics, model training via CREATE MODEL, and validation via ML.EVALUATE/ML.PREDICT—within the single Vertex AI Workbench notebook environment. Community comments highlight that this centralized workflow is cleaner and easier to reproduce. By keeping everything in the notebook, you leverage the visualization tools throughout the process without context-switching to the BigQuery Console UI, making it the most streamlined and integrated solution for the stated goals.

Exam Strategy

When questions ask for the 'simplest' approach involving BigQuery ML, always check if 'AutoML' is a viable option for the specific task (e.g., classification vs. regression). If the question emphasizes 'visualization' and 'workflow integration', prefer Vertex AI Workbench notebooks over raw console commands, as they combine EDA, coding, and SQL execution in one interface. Avoid options that require moving data out of BigQuery (like CSV exports) unless explicitly required, as these add complexity.

Frequently Asked Questions

Does BigQuery Console have built-in visualization tools?

No, the BigQuery Console is primarily for query execution and management. It lacks the rich, interactive visualization capabilities found in Vertex AI Workbench notebooks using Python libraries like Matplotlib or Plotly.

Why not use AutoML for Customer Lifetime Value?

While AutoML simplifies feature engineering, it may not be the best fit for specific regression tasks like CLV in all contexts, and more importantly, the option to run 'CREATE MODEL' for AutoML is syntactically incorrect in the context of the exam question's distractors.

More PMLE FAQ →

Community Votes

D
46%
B
46%
A
8%

46% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 18 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 18

  1. rcapj 👍 6
    D Vertex AI Workbench notebook: Provides an environment for data analysis, model building, and visualization tools all in one place. IPython magics: Allows seamless interaction with BigQuery for data exploration and feature creation directly within the notebook. CREATE MODEL statement: Enables model creation within the notebook environment, simplifying the workflow. ML.EVALUATE and ML.PREDICT statements: Facilitate model validation directly within the notebook for assessing performance.
  2. pertoise 👍 6
    Option B because there's no mention of "flexibility". Easy access to viz tools with Looker
  3. omermahgoub 👍 3
    B. Use Bigquery ML Features to create, evaluate and predict
  4. Antmal 👍 2 Answered D
    I think D is the best and simplest approach. Here’s why: 1. Centralised Workflow: Everything from data exploration to model validation happens within a single Vertex AI notebook. This is clean, organised, and easily reproducible. 2. Powerful Visualisations: Notebooks allow you to use powerful Python libraries like Matplotlib, Seaborn, and Plotly for rich, interactive EDA. 3. Seamless BigQuery Integration: Using IPython magics (e.g., %%bigquery) allows you to run SQL queries directly on your BigQuery data from within the notebook, making it easy to create feature tables, train models (CREATE MODEL), and evaluate them (ML.EVALUATE) without ever leaving the notebook environment.
  5. OpenKnowledge 👍 2 Answered D
    Although option B provides the simplest model (i.e., AutoML), it doesn't provide a visualization tool; because BigQuery ML itself does not have a built-in, comprehensive visualization tool for exploring models or their results. However, it integrates seamlessly with various visualization tools within the Google Cloud ecosystem and beyond. So, B is not an option for it. The other three options uses Vertex AI Workbench which will have access to comprehensive Visualization tools. Among the three options, D is the simplest approach which uses iPython magics (or simply, magics) for interactive shell
Show 13 more comments
  1. pikachu007 👍 2 Answered A
    Option B: While AutoML simplifies model selection and training, it lacks the flexibility and visualization capabilities of Vertex AI Workbench. Option C: Manually saving features as CSV files and importing them back into BigQuery involves unnecessary data movement and complexity. Option D: Completing all steps within the notebook is possible but requires more coding and might not be as intuitive for those less familiar with BigQuery ML syntax.
  2. LaxmanTiwari 👍 2 Answered B
    As requested :" simplest approach", the option B is the best choice.
  3. andymetzen 👍 2
    Option D is the answer given by an official Google trainer.
  4. b1a8fae 👍 2
    Simplest approach that allows visualization is option B.
  5. Dirtie_Sinkie 👍 2 Answered D
    Going for D
  6. lance_yu 👍 1 Answered D
    The question specifically mentions: want to have access to visualization tools A Vertex AI Workbench notebook provides: Exploratory Data Analysis (EDA) Charts and visualizations (Pandas, Matplotlib, Plotly) Direct BigQuery integration through IPython magics (%%bigquery) Ability to create and evaluate BigQuery ML models from the notebook This combines: Visualization Feature engineering Model training Model evaluation in one environment.
  7. Wuthuong1234 👍 1 Answered B
    The correct answer is probably B. AutoML does the feature engineering for you, so it requires the least amount of effort. For all other options, you have to do the exploration and feature engineering yourself, which will take a lot of time. In a real world scenario you'd expect to do a bit of EDA to identify and deal with missing values and to check the data quality though... even if you go for the B option.
  8. NithishReddyNY 👍 1 Answered D
    Option D provides the best balance of simplicity and meeting all requirements. It allows for visualization and EDA in Vertex AI Workbench and uses the simplest modeling approach (BQML via SQL commands) executed directly from the notebook environment using IPython magics, creating a cohesive and straightforward workflow.
  9. 8c200dd 👍 1 Answered B
    in question the said simple implementation, so ML.EVALUATE and ML.PREDICT
  10. winston9 👍 1 Answered B
    all the other options create a new BQ table, I don't think it's needed.
  11. tardigradum 👍 1
    Simple training and integration with visualization tools = BQ
  12. nnn245bbb 👍 1 Answered D
    Based on ChatGPT answer
  13. b1a8fae 👍 1 Answered B
    Forgot to vote.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All PMLE Questions

Access 65 questions with complete answers and detailed explanations.

View Full PMLE Practice Test →

← Back to PMLE Study Guide