After updating the Google Cloud SDK 189.0.0, the previously subtle bq query --nouse_legacy_sql " ... " command will now look like this:
$ python --version Python 2.7.13 :: Anaconda, Inc. $ bq version This is BigQuery CLI 2.0.29 $ bq query --nouse_legacy_sql "SELECT country, model, iid, version, count(*) as n, max(t) AS t FROM an6.sm GROUP BY country, model, iid, version ORDER BY t DESC LIMIT 10 " bq.py should not be invoked. Use bq command instead. $
Re-restore the previous version.
$ gcloud components restore Your Cloud SDK installation will be restored to its previous state. Do you want to continue (Y/n)? Y Restoring backup... Performing post processing steps...done. Restoration done! $ bq query
source share