BigQuery Flashcards

1
Q

BigQuery description

A

petabyte scale analytics database service for data warehousing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

BigQuery key points (9)

A
  1. serverless
  2. uses standard sql queries
  3. near real-time interactive analysis of massive data sets
  4. can access info stored in Cloud Storage, Cloud SQL, Bigtable and Google Drive
  5. Storage and computing are handled and billed separately
  6. Automatic data replication
  7. Can modify data with DLL
  8. Can query public or commercial data sets.
  9. High availability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are 3 BigQuery use cases?

A
  1. Real-time Inventory
  2. Predictive Marketing
  3. Analytical Events
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What Google apps can BigQuery access?

A
  1. Cloud Storage
  2. Cloud SQL
  3. Cloud Bigtable
  4. Google Drive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you estimate the cost of a BigQuery query via shell?

A

You run the query with a flag of –dry_run set

bq –location=[LOCATION] query –use_legacy_sql=false –dry_run [SQL QUERY]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are jobs in BigQuery?

A

Processes used to load, export copy and query data. Jobs are automatically started when you start one of these processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you view the status of a BigQuery job? (Shell and console)

A

Console - click job history from BQ console

Shell - bq –location=[LOCATION] show -j [JOB ID]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you export BQ data from the console?

A

go to BigQuery -> Resources, open the dataset containing the table to be exported and select the table. Export options are on upper right

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Where can you export BQ data to?

A

Cloud Storage or Data Studio (a GCP analysis tool)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you import BQ data via console?

A

go to BiqQuery -> Resources and select a dataset to import into.
Click create table tab.
Select a source,
file format (if source is not empty table)
table type (external or native - if external, data is kept in source location and only metdata about the table is stored in BigQuery
table name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What file formats can you import data from in BigQuery?

A
CSV
JSON
Avro
Parquet
PRC
Cloud Datastore Backup
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you export BigQuery data from the command line?

A

bq extract –destination_format [FORMAT] –compression [COMPRESSION] –field_delimiter [DELIMITER] –print_header {BOOLEAN] [PROJECT ID]:[DATASET].[TABLE] gs://[BUCKET]/FILENAME

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you import data into BigQuery from the command line?

A

bq load –autodetect –source_format=[FORMAT[ [DATASET].[TABLE] [PATH to SOURCE]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly