[ETR #38] Powerful But Messy Data


Extract. Transform. Read.

A newsletter from Pipeline

Hi past, present or future data professional!

As difficult as data engineering can be, 95% of the time there is a structure to data that originates from external streams, APIs and vendor file deliveries. Useful context is provided via documentation and stakeholder requirements. And specific libraries and SDKs exist to help speed up the pipeline build process.

But what about the other 5% of the time when requirements might be structured, but your data isn’t?

Unstructured data comes in many forms, including incomprehensible metadata from ioT devices; I have the most experience with textual data, so I can speak to how I recommend approaching this classification of data.

Since I nearly always work with structured data at work, I’ll be speaking from my experience scraping web data, parsing text files and reading PDFs.

  • Understand the min() max() and shape of your data; for textual data, this means knowing first and last pages (or tokens) and the length of your doc
  • As soon as possible, aggregate your raw data into a form you can work with; I’m partial to lists that I convert to data frame columns, but you could just as easily construct a dict()
  • Once you know what you’re looking for, leverage regex string searches to avoid processing EVERYTHING; there are many regex generators that can check your expressions as you write them
  • If you’re really lost, check the rendered output of your data; if this is a PDF, open your file in preview or a similar view

Finally, if you’re working with a particular type of data, understand what libraries are available to reduce the manual parsing that will be required.

And remember, the only shape you don’t want your data in is (0,0).

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! SQL Lite, the database you most likely learned SQL on, is built atop 100k lines of source code. Sound like a lot? Compare that to Chromium, the engine for Google Chrome, which boasts 30+ million lines of code under the hood. Shortly after acquiring Twitter/X, the world's first trillionaire, Elon Musk, famously asked engineers to tell him how many lines of code they wrote per day, igniting a debate among engineers throughout the software and data domains. When I...

Hi fellow data professional! If you read my note on Tuesday you’ll know I’m coming off of the data engineering week from hell that seeped into my personal life, and delayed the launch of something cool I was planning to share with you; if you want to know more about that, scroll to the end of this message. Last week a flagship data source had a major problem and since it’s within my ownership area, I was the one with the knowledge and responsibility to fix it. I wanted to share the experience...

Hi fellow data professional! Hardly a work day goes by without receiving a request from a data analyst. They range from the mundane “Can you add this column?” to the occasional emergency “The data didn’t load all weekend and the leadership call starts in 15 minutes!” At the end of a jam-packed week I received an unusual request: Help with a Python script. My teammate wanted to know: Best practices How to commit to GitHub What the best way to deploy is They admitted the task was simple,...