Title: 544
Tags: lec36

Q: What are some factors you might consider when choosing a GCS bucket region?
A: Cost, carbon emissions, proximity to users, etc.

Q: What is the GCP marketplace?
A: Collection of datasets (some free) that can directly be queried with BigQuery (the marketplace also includes software and other things).

Q: How can you activate/deactivate your GCP credentials on a GCP VM?
A: gcloud auth ...

Q: What does this let you do?
%load_ext google.cloud.bigquery
A: It lets you write BiqQuery queries directly in Jupyter cells, like this:
%%bigquery
SELECT * FROM some_table

Q: You run this:
q = bq.query("...")
Why might q.total_bytes_processed be different than q.total_bytes_billed?
A: Billing gets rounded up to the nearest MB, and there is a 10 MB min overall.

Q: What is a cross join?
A: Every row in table A is matched with every row in table B (there is no "ON" expression to limit the matches between tables).

Q: What is a correlated cross join?
A: Some fields in a row might contain multiple values -- for example, it could be an an array of structs.
A correlated cross join does a cross join on a row by row basis.  For example, say we have two rows like this, and we are doing a correlated cross join between the two columns:
[1], [2,3]
[4,5], [6,7]
We would get these outputs:
1,2
1,3
4,6
5,6
4,7
5,7
Notice we don't join across rows (for example, 1 does NOT get paired with 6).

Q: If you want to do a correlated cross join against a field C containing an array of structs, how do you first "expand" the arrays so each entry becomes its own row?
A: UNNEST(C)