Skip to content

Instantly share code, notes, and snippets.

@sourishkrout
Created April 23, 2024 13:45
Show Gist options
  • Save sourishkrout/9c079a68fc0801a6bf7fe8a71366dd63 to your computer and use it in GitHub Desktop.
Save sourishkrout/9c079a68fc0801a6bf7fe8a71366dd63 to your computer and use it in GitHub Desktop.

File name: bigquery.md

Session: 01HW5JP6E6V0AA496GXC5A327C


▶️ Generated by Runme

Share your own terminal sessions, it's free and open source. Click here to learn more.

runme
id version document session
01HW5HAV18EP316QFQ4WJ1TW5B
v3
relativePath
bigquery.md
id updated
01HW5JP6E6V0AA496GXC5A327C
2024-04-23 09:45:01 -0400

BigQuery 📊

SELECT title, num_characters, timestamp, id, revision_id FROM
  `bigquery-public-data.samples.wikipedia`
WHERE num_characters < 67100
LIMIT 10;

# Ran on 2024-04-23 09:36:11-04:00 for 23ms
SELECT title, num_characters, timestamp, id, revision_id FROM
  `bigquery-public-data.samples.wikipedia`
WHERE num_characters < 67100
LIMIT 10;
# We usually run this query periodically to get the latest data

bq query --format prettyjson --use_legacy_sql=false $SQL_QUERY

# Ran on 2024-04-23 09:36:11-04:00 for 1.**1s
[
  {
    "id": "3180872", 
    "num_characters": "61384", 
    "revision_id": "41659681", 
    "timestamp": "1141163708", 
    "title": "List of rock instrumentals"
  }, 
  {
    "id": "7218423", 
    "num_characters": "7681", 
    "revision_id": "98280692", 
    "timestamp": "1167865013", 
    "title": "SSX (series)"
  }, 
  {
    "id": "2155581", 
    "num_characters": "23755", 
    "revision_id": "213902724", 
    "timestamp": "1211356755", 
    "title": "List of Christian metal bands"
  }, 
  {
    "id": "9056492", 
    "num_characters": "29883", 
    "revision_id": "271239723", 
    "timestamp": "1234831910", 
    "title": "The Naked Brothers Band: The Movie"
  }, 
  {
    "id": "4758956", 
    "num_characters": "30991", 
    "revision_id": "168345002", 
    "timestamp": "1193854447", 
    "title": "Ministry of Jesus"
  }, 
  {
    "id": "745358", 
    "num_characters": "34879", 
    "revision_id": "224494658", 
    "timestamp": "1215571274", 
    "title": "List of indoor arenas"
  }, 
  {
    "id": "11497875", 
    "num_characters": "3047", 
    "revision_id": "239903345", 
    "timestamp": "1221959794", 
    "title": "Place Vertu"
  }, 
  {
    "id": "215403", 
    "num_characters": "6898", 
    "revision_id": "188145820", 
    "timestamp": "1201786971", 
    "title": "Case law"
  }, 
  {
    "id": "5852422", 
    "num_characters": "3185", 
    "revision_id": "123056525", 
    "timestamp": "1176667240", 
    "title": "Northallerton College"
  }, 
  {
    "id": "179512", 
    "num_characters": "35615", 
    "revision_id": "170397386", 
    "timestamp": "1194639026", 
    "title": "Jumping the shark"
  }
]

Read the docs on runme.dev to learn how to get most out of Runme notebooks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment