Skip to content

Instantly share code, notes, and snippets.

Lunch & Learn: SQL and ETLs for Presto and MARS

Blurb

Presto lets us trade APIs for queryable data-structures. Many APIs are already in Presto including Jira, TIPS, and DAG data. MARS uses Presto to run batch-procesing jobs against these data-structures. SQL is the (unfortunate) lingua-franca in this land.

This is a new and foreign situation for some of us, but it's not scary. If you know some MQL or even basic Python you can pick up Presto's SQL easily to quickly explore data within dev-prod and the rest of the company. And MARS is both simpler and more powerful than you might guess.

In a few days everyone in dev-prod and STAR will automatically have access to Presto. Let's hit the ground running.

#!/usr/bin/env python3
import sys
try:
import numpy as np
except:
print(f"numpy not found:\n\tpip install numpy")
sys.exit(1)
@rtimmons
rtimmons / slides.md
Created June 21, 2018 18:11
Learning C++ The Hard Way

Welcome

Who is this guy?

Goal(s)

  1. Don't WTF quite so much when looking at C++ PRs
  2. Know what you don't know (so you know what to look up to learn more)

Agenda

@rtimmons
rtimmons / keybase.md
Created July 29, 2017 19:31
keybase identity

Keybase proof

I hereby claim:

  • I am rtimmons on github.
  • I am rtimmons (https://keybase.io/rtimmons) on keybase.
  • I have a public key whose fingerprint is 5C29 D562 617F DC29 F2F7 DAF7 049A 9152 16E9 0530

To claim this, I am signing this object:

// ==UserScript==
// @name Trumpicana
// @namespace http://tampermonkey.net/
// @version 0.1
// @description grab the 🙀
// @author not me
// @match http://*/*
// @grant none
// ==/UserScript==
@rtimmons
rtimmons / itunes-count.pl
Created September 13, 2012 16:50
How much time have you spent listening to...
#!/usr/bin/env perl -w
=pod
Use: Count the amount of time spent listening to a particular artist
Example usage:
./itunes-count.pl \
--libxml=$HOME/Music/iTunes/iTunes\ Music\ Library.xml \
var e = {
n: function() {
this.self = this;
}
}