GoogleCloudPlatform / training-data-analyst

Labs and demos for courses for GCP Training (http://cloud.google.com/training).
Apache License 2.0
7.93k stars 5.88k forks source link

Error in courses/machine_learning/deepdive2/launching_into_ml/labs/python.BQ_explore_data.ipynb lab #2292

Open VeerMuchandi opened 1 year ago

VeerMuchandi commented 1 year ago

https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/machine_learning/deepdive2/launching_into_ml/labs/python.BQ_explore_data.ipynb

The queries to BQ to extract trips from the dataset fail

%%bigquery
SELECT
    FORMAT_TIMESTAMP(
        "%Y-%m-%d %H:%M:%S %Z", pickup_datetime) AS pickup_datetime,
    pickup_longitude, pickup_latitude, dropoff_longitude,
    dropoff_latitude, passenger_count, trip_distance, tolls_amount, 
    fare_amount, total_amount 
# TODO 3: Set correct BigQuery public dataset for nyc-tlc yellow taxi cab trips
# Tip: For projects with hyphens '-' be sure to escape with backticks ``
FROM 
LIMIT 10

Here is the error

Could not save output to variable 'trips'.

ERROR:
 _blocking_poll() got an unexpected keyword argument 'retry'
yingding commented 1 year ago

You need to pin down the dependency of the google-cloud-bigquery, please use

!pip install --user google-cloud-bigquery==1.25.0 google-api-core==1.33.2

in cell 2

yingding commented 1 year ago

This is my PR for fixing the issue https://github.com/GoogleCloudPlatform/training-data-analyst/pull/2296