
Answer-first summary for fast verification
Answer: Use AI Platform Notebooks' BigQuery cell magic to query the data, and ingest the results as a pandas dataframe.
The correct answer is A: 'Use AI Platform Notebooks' BigQuery cell magic to query the data, and ingest the results as a pandas dataframe.' This method is recommended by Google as it allows for seamless integration between BigQuery and AI Platform Notebooks. It is the most straightforward and efficient approach compared to manually exporting the data to CSV and then importing it back into the notebook. Specifically, the IPython magics for BigQuery make it easy to run SQL queries and load the results directly into a pandas dataframe, optimizing productivity and minimizing errors.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You work for an advertising company that recently launched a new advertising campaign. To assess the campaign's effectiveness, you collected 500 MB of related campaign data and stored it in BigQuery. Your task is to query this data and then further analyze the results using a pandas dataframe within an AI Platform notebook. What should you do?
A
Use AI Platform Notebooks' BigQuery cell magic to query the data, and ingest the results as a pandas dataframe.
B
Export your table as a CSV file from BigQuery to Google Drive, and use the Google Drive API to ingest the file into your notebook instance.
C
Download your table from BigQuery as a local CSV file, and upload it to your AI Platform notebook instance. Use pandas.read_csv to ingest the file as a pandas dataframe.
D
From a bash cell in your AI Platform notebook, use the bq extract command to export the table as a CSV file to Cloud Storage, and then use gsutil cp to copy the data into the notebook. Use pandas.read_csv to ingest the file as a pandas dataframe.