nerdexam
Google

PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #13

You work for an advertising company and want to understand the effectiveness of your company's latest advertising campaign. You have streamed 500 MB of campaign data into BigQuery. You want to query…

The correct answer is A. Use AI Platform Notebooks' BigQuery cell magic to query the data, and ingest the results as a. AI Platform Notebooks supports a native BigQuery cell magic (%%bigquery dataframe_variable) that executes a SQL query against BigQuery and loads the results directly into a named pandas DataFrame in the notebook's Python kernel. This is the most direct, integrated, and…

Submitted by diego_uy· Apr 18, 2026Data processing and feature engineering

Question

You work for an advertising company and want to understand the effectiveness of your company's latest advertising campaign. You have streamed 500 MB of campaign data into BigQuery. You want to query the table, and then manipulate the results of that query with a pandas dataframe in an AI Platform notebook. What should you do?

Options

  • AUse AI Platform Notebooks' BigQuery cell magic to query the data, and ingest the results as a
  • BExport your table as a CSV file from BigQuery to Google Drive, and use the Google Drive API to
  • CDownload your table from BigQuery as a local CSV file, and upload it to your AI Platform
  • DFrom a bash cell in your AI Platform notebook, use the bq extract command to export the

How the community answered

(60 responses)
  • A
    73% (44)
  • B
    3% (2)
  • C
    15% (9)
  • D
    8% (5)

Explanation

AI Platform Notebooks supports a native BigQuery cell magic (%%bigquery dataframe_variable) that executes a SQL query against BigQuery and loads the results directly into a named pandas DataFrame in the notebook's Python kernel. This is the most direct, integrated, and efficient workflow-no data ever touches local disk, no intermediate export is needed, and the result is immediately available for pandas manipulation. Option B (export to Google Drive → Google Drive API) involves unnecessary intermediate steps and API complexity. Option C (download as local CSV then upload to notebook) is a manual, slow process that moves data unnecessarily. Option D (bq extract to Cloud Storage) exports data to Cloud Storage in a file format, which would then require a second step to download and parse-also unnecessarily complex compared to the built-in cell magic.

Topics

#BigQuery#AI Platform Notebooks#Pandas#Data Ingestion

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-MACHINE-LEARNING-ENGINEER Practice