What should you do?

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 Al Platform notebook.

What should you do?
A . Use Al 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 Al Platform notebook instance Use pandas. read_csv to ingest the file as a pandas dataframe
D . From a bash cell in your Al Platform notebook, use the bq extract command to export the table as a CSV file to Cloud Storage, and then use gsutii cp to copy the data into the notebook Use pandas. read_csv to ingest the file as a pandas dataframe

Answer: A

Explanation:

Refer to this link for details: https://cloud.google.com/bigquery/docs/bigquery-storage-python-pandas

First 2 points talks about querying the data.

Download query results to a pandas DataFrame by using the BigQuery Storage API from the IPython magics for BigQuery in a Jupyter notebook.

Download query results to a pandas DataFrame by using the BigQuery client library for Python. Download BigQuery table data to a pandas DataFrame by using the BigQuery client library for Python.

Download BigQuery table data to a pandas DataFrame by using the BigQuery Storage API client library for Python.

https://googleapis.dev/python/bigquery/latest/magics.html#ipython-magics-for-bigquery

https://cloud.google.com/bigquery/docs/bigquery-storage-python-pandas

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments