Published inData Engineer’s NotesUsing LAST_VALUE with STRUCTSEven an “empty” STRUCT is still technically something. Not the same as a standalone NULL value.Oct 5Oct 5
Published inData Engineer’s NotesTable grain quick validation with SQLI was doing some exploratory data analysis on a number of tables I didn’t have much information about and, unfortunately, didn’t know their…Oct 4Oct 4
Published inData Engineer’s NotesWITH expressions in BigQuerySo I recently discovered the WITH expression in BigQuery SQL.Sep 30A response icon1Sep 30A response icon1
Published inData Engineer’s NotesBeware of ROW_NUMBER without ORDER BYHaven’t posted all summer, but this bug pulled me straight out of the shadows.Sep 30Sep 30
Published inData Engineer’s NotesAggregating Multiple SCD-2 Attribute Timelines in BigQueryHere’s another practical BigQuery SQL exercise 💡Jun 11Jun 11
Published inData Engineer’s NotesCross-dataset foreign key relationships in BigQueryIt turns out you can now (don’t know since when though) create cross-dataset foreign key relationships in BigQuery hashtag#SQL. Previously…Jun 9Jun 9
Published inData Engineer’s NotesWhy you should think twice before UNNESTing arrays or date intervalsIf you ever work with terabyte-scale data, try to avoid unnecessary unnesting/unpacking arrays and date ranges. If you have no choice…Jun 9Jun 9
Published inData Engineer’s NotesCompacting date intervals in BigQueryHere’s a practical BigQuery SQL exercise that highlights some important concepts as well is an interesting algorithm imho. I’ve pair…Jun 9Jun 9
Published inData Engineer’s NotesNull-safe comparison: IS DISTINCT/NOT DISTINCT FROMI’ve been working for surprisingly long with SQL to have found this only a few days ago. Not long enough I guess 🤓.May 6May 6
Published inData Engineer’s NotesTransforming cumulative sums into monthly valuesHere’s a quick BigQuery SQL exercise. I often work with cumulative aggregations, but it’s not every day that I need to reverse…Mar 27Mar 27