Database Reference
In-Depth Information
$ export BIGQUERYRC=$HOME/
.bigqueryrc.$SERVICE_ACCOUNT_ID
$ bq ls -j
$ bq query '
SELECT zip FROM [bigquery-e2e:reference.zip_codes]
WHERE area_codes CONTAINS "425" LIMIT 3'
+-------+
| zip |
+-------+
| 98004 |
| 98005 |
| 98006 |
+-------+
$ bq --format=csv ls -j
jobId,Job Type,State,Start Time,Duration
bqjob_r11253d471625_0140a50036d1_1,query,SUCCESS,22
Aug 00:49:48,0:00:00
In the command above, you set the BIGQUERYRC environment variable,
which is equivalent to passing the -bigqueryrc global flag to the client.
You can clear this environment variable by running:
$ unset BIGQUERYRC
After running a query the job list is no longer empty. When you switch
back to your account, by clearing the environment variable, the job list does
not contain the jobs run by the service account. Keep in mind that setting
the environment variable from the command line only affects the current
terminal session.
If you ran all the commands in this section without errors, then you have
your client configured for service account access.
Setting Up Google Cloud Storage
You can do quite a bit with BigQuery without enabling any other services in
the Google Cloud Platform. However, to get the most out of the service, it
is best used with other components of the platform. Google Cloud Storage
is particularly useful because it effectively serves as the hard disk for the
Search WWH ::




Custom Search