[ETR #23] Testing... Testing


Extract. Transform. Read.

A newsletter from Pipeline

Hi past, present or future data professional!

It’s never good when you wake up to this from a coworker:

💀

The skull wasn’t because the sender felt like they would suffer any kind of dramatic fate. Instead, they were prepared to administer near-fatal justice to the junior engineer who made several unnecessary overnight commits straight to our org’s main branch.

The thing is, for a first-time violation, I can understand why testing is an afterthought for new engineers. Schools and courses emphasize local output over production so testing feels like an extra step.

To properly test code, you need to configure a clean, production-adjacent environment. If you’re new to this concept, here are 2 of my favorites along with an unusual choice.

The safe choice: Virtual Environment

I use two virtual environments that can be configured interchangeably: Pyenv and Venv.

Pyenv is easy to configure and use within a terminal in a “professional” IDE like VS code. Pyenv is ideal because it allows me to create an environment from a blank slate each time.

Venv is another option. Instead of using Venv in VS Code this is how I set up a virtual Python environment inside of a Virtual Machine (VM).

Read more to learn how to set up a quick, durable sandbox in a Compute Engine VM.

The portable option: Docker

I’ll confess: I didn’t used to be a fan of Docker. I didn’t really “get” containerization and could set up a virtual environment using the processes described above.

However, I learned that Docker’s true power is its portability. Not only can I create a clean slate (an image), I can push this to a registry to create testing configs before I test script changes in production.

Powerful stuff.

The one issue I had was authenticating with GCP; I describe my solution here.

The unusual pick: Jupyter Notebook

Jupyter Notebook gets a bad rap in the data engineering community. Seen as a tool for data analysts and data scientists, it doesn’t quite make sense for data engineers to develop and test in an environment best known for its nicely rendered outputs.

But buying into that argument would cause you to miss out on some useful features and, frankly, a nice UX.
I recently discussed my internal struggle between VS Code and Jupyter so you can do your own soul-searching.

And so you don’t have to search for resources, here are this week’s links.

What’s your preferred testing ground? Let me know: zach@pipelinetode.com.

Thanks for ingesting,

-Zach Quinn

Extract. Transform. Read.

Reaching 20k+ readers on Medium and over 3k learners by email, I draw on my 4 years of experience as a Senior Data Engineer to demystify data science, cloud and programming concepts while sharing job hunt strategies so you can land and excel in data-driven roles. Subscribe for 500 words of actionable advice every Thursday.

Read more from Extract. Transform. Read.

Hi fellow data professional! Ken Jee, who you heard from last week, drops some sobering career advice in one of the earliest editions of AI Survival Guide: Making a senior-level tech role is no longer about advancement; it’s about survival. The post talks about the growing moat or "wall" between those breaking into the industry, those in entry-level roles and those in a mid-career phase. In the spirit of AI Survival Guide’s advice to bridge the gap separating the early and mid-career...

Hi fellow data professional!' Today I’m turning the newsletter over to my friend Ken Jee (writer of AI Survival Guide, creator of Newsletter Hero) to share how he cuts through the noise of shiny AI products to find tools that enhance technical work. My Simple Framework For Adopting AI Tools Ken Jee As new AI tools launch almost daily, a quiet tax is emerging. Decision fatigue. Every new model, agent, or workflow tool carries the same implicit question. Should I switch, or should I go deeper...

Hi fellow data professional! Quick question: How much could I pay you to switch your job? Conventional wisdom in the tech industry in the last handful of years is that the way to supercharge growth and max out your career earnings is to frequently change jobs. On average, job switchers could and should target an increase of 15-20% of their current salary. But in a rocky economy (at least here in the U.S.), career experts are urging would-be switchers to consider the benefits of a stable role...