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…
Question
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)- A73% (44)
- B3% (2)
- C15% (9)
- D8% (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
Community Discussion
No community discussion yet for this question.