716 karma · joined May 6, 2012
* Lowercase for tables & columns and upper case for syntax.
* Having commas first makes it easier to move lines around.
* I avoid small aliases to minimize conflicts when code is resused.
* Every column needs a table reference. Do not make me guess.
* Alias every column in the SELECT clause.
SELECT
table1.col1 AS table_col1
, table2.col2 AS table_col2
, table3.col3 AS table_col3
FROM
table1 table1
INNER JOIN
table2 table2
ON
table1.col2 = table2.col1
INNER JOIN
table3 table3
ON
table1.col3 = table3.col1
AND table3.col2 = something_else
WHERE
table1.col1 > 0
AND table2.col2 <> table1.col4
ORDER BY
table2.col2
LIMIT 100;* Add commas before the variable * Do not use single letters for aliases. Some versions of hive will throw exceptions. Plus seeing tables a, b, c, d joined together is annoying to read.
This is also very creepy.
[edit] Presentation is ongoing and there is a return trip. Cool.
So much for that...
Another point I'd like to make is that not everyone hates ETL and pipeline management. I happen to like it. It's rewarding to stand up reliable self-healing data pipelines and ETLs.
Much ado about nothing.
That would be true if your best friend didn't know your name, address, email, date of birth, and phone number. You see, AT&T, among others, will scrub Personally Identifiable Information("PII") from the data before sharing the data.
He seems like a good person to get into business with. He's so non-judgmental. Reminds me of myself and all the stupid things I said to VCs in my 20s.