Update BigQuery access instructions (#1442)

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
This commit is contained in:
Azeem Shaikh 2022-01-06 16:06:23 -05:00 committed by GitHub
parent e2d3e8e1a5
commit f36e2223ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,12 +322,12 @@ the [`bq`](https://cloud.google.com/bigquery/docs/bq-command-line-tool) tool:
# Get the latest PARTITION_ID
bq query --nouse_legacy_sql 'SELECT partition_id FROM
openssf.scorecardcron.INFORMATION_SCHEMA.PARTITIONS WHERE table_name="scorecard-v2"
ORDER BY partition_id DESC
AND partition_id!="__NULL__" ORDER BY partition_id DESC
LIMIT 1'
# Extract to GCS
bq extract --destination_format=NEWLINE_DELIMITED_JSON
'openssf:scorecardcron.scorecard-v2$<partition_id>' gs://bucket-name/filename.json
'openssf:scorecardcron.scorecard-v2$<partition_id>' gs://bucket-name/filename-*.json
```