r/dataengineering • • 7d ago

Discussion Inherited a PB scale data mess. Looking for tech & people strategies.

Hello good folks of /r/dataengineering,

I need opinion &/ guidance on how you would handle such a situation.

Inherited a large data data platform PB level, with a lot of pipelines, tables and tools. Built mostly on OSS and K8s stack.

  1. Company grew very fast (think non-tech startup, public now), BigQuery is the primary warehouse, with a mix of batch and streaming.
  2. Engineers came and went, lot of the platform is not maintained and people do not wish to touch what works. Eg. There are teams that still use Airflow 1.10.
  3. There are a lot of pipelines and data sets are that are no longer in use, they're running on schedule and cost $$.
  4. Schedules are all over the place. I found a pipeline that runs daily, powering a report that only gets sent out every two weeks.

I was planning on mapping everything first then use that data to make culling decisions, but there is internal resistance from business. Folks are not even ready to spend time to add metadata on their own datasets.

What do you folks recommend I do? Any suggestions on both technical and people strategies would be greatly appreciated.

Please don't plug your tool here.

61 Upvotes

35 comments sorted by

42

u/Standard_Act_5529 7d ago

Time for some spelunking. Access logs to see who is using the data. Say you need to update airflow for security reasons (you do).  Turn things off and if people complain re-enable them.

All that said, doesn't sound too off from what I was dealing with (we were on airflow 2.. I guess we still are, just a couple more subdags to remove). I'm leaning toward pushing for managed services for everything. There's so much more I can do if I'm not worried about applying security patches for our bespoke solutions.

If you're on airflow 1, I bet you can get people their data considerably faster with some simple tweaks, that's how you can get them to want to change. Also could you centralize your airflow instance? Or migrate directly to 3. Only copy over what people actually use.

5

u/brickkcirb 7d ago

Access logs to see who is using the data

That's my plan.

Say you need to update airflow for security reasons (you do)

Planning to make teams sign a wavier saying that they acknowledge the security concerns by staying with the old airflow.

2

u/carrot_flowers 3d ago

I wouldn’t do the waiver thing. When shit hits the fan, your leadership won’t care about a piece of paper, and _you_ (not those other teams) are responsible for the platform. Maintaining the company’s security posture isn’t something that teams get to choose, and if they aren’t playing ball with you, get their managers involved.
I really do get that’s it’s frustrating, but non-technical problem solving is a part of the job and a skill you can develop.

1

u/Personal-Yard-127 7d ago

Depending on your company's compliance posture, that's likely not an offer you can make, and not something that teams are empowered to agree too. High or critical defects in particular have required remediation SLAs that your company publicly commits to.

Unless you're seeking to make enemies, you need both stick and carrot.

Communicate and build consensus that everything must be updated because of $reasons (get buy-in from your security officer or other key execs who will back $reasons). Communicate a reasonable timeline after which un-remediated pipelines will be turned off (many or most are presumably abandoned, and this is their resolution - this is a scream test, and there will probably be some screams, so be ready). Then **dig in** and work with teams to help them get themselves lifted. Offer resources, guidance, pitch in on IC work, whatever. Try and start with a tracer bullet, so you don't overwhelm yourself and the teams you're working with. Pick a team and get them lifted successfully, so the rest of the org **sees** that it happened and begins to believe in the effort, which snowballs (and defer broad ultimatums or hard dates until real progress is visible if at all possible). Migrations suck but this is also a great opportunity to level up in your career.

4

u/TA_poly_sci 7d ago

The "Let's see if anyone notices" approach to changes for these sorts of things is a very viable and often very useful approach indeed. With the easiness of getting AI to write tests today, it should also be fairly easy to set up a workflow that checks any new solution is outputting identically to the old solution.

1

u/Ddog78 6d ago

I inherited a similar stack as OP. Airflow 3 doesn't save money itself so its not a fight I've been able to win yet. Furthermore, it's useful but it doesn't really help put out fires that OP will encounter.

Upgrading spark (I'm assuming since OP said k8s) saves costs. It took a long time but it worked.

Adding run time validations like schema checks and checking composite keys catches errors early in the pipeline. Create a generic function that takes a dataframe, a schema, unique keys and use it in every job.

If there's a UI, there's a database (postgres, MySQL) - refer to the indexes, PKs, FKs to get a sense of how data is correlated.

15

u/MyWorksandDespair 7d ago

I would first spend the time to map everything to include all the upstream/downstream interdependencies- and create a list of candidates for enhancement, or obsolescence via negligible query history- make sure to communicate everything with stakeholders.

The query history that these large data warehouses are a gold mine for user analytics and what is actually important.

Find all those stupid tables with suffixes like _Q22023, or _v2 and clean that up for sure.

7

u/brickkcirb 7d ago

Find all those stupid tables with suffixes like _Q22023, or _v2 and clean that up for sure.

Most of the warehouse are these. Sigh!

4

u/MyWorksandDespair 6d ago

You now have a novel opportunity to establish some rigor around governance. Allow for a real demarcation between user created objects and business critical ones/pipelines. It sounds heinous now- but communicate a lifecycle for the noisy and unused datasets, and you’ll get there just fine.

10

u/baubleglue 7d ago

Unless you can build a case, convince some high management, you can't do anything.

From technical point of view, "map everything, then ..." won't work. You need a plan for gradual migration towards the goal. That means you need a set of well defined goals. For example you can install Airflow 3 and slowly migrate jobs to it. As you migrate them, you restructure them using desired template (for example use dbt, so will have an automatic metadata in place). But without teams onboard it isn't possible. Try to find convincing immediate benefits of changing things.

2

u/brickkcirb 7d ago

Unless you can build a case, convince some high management, you can't do anything.

Yeah, doing that now.

You need a plan for gradual migration towards the goal. That means you need a set of well defined goals. For example you can install Airflow 3 and slowly migrate jobs to it. As you migrate them, you restructure them using desired template (for example use dbt, so will have an automatic metadata in place). But without teams onboard it isn't possible.

Thanks, these are good steps.

1

u/carrot_flowers 3d ago

This guy migrates

6

u/Prestigious_Bench_96 7d ago

Can you expand on "I was planning on mapping everything first then use that data to make culling decisions, but there is internal resistance from business. Folks are not even ready to spend time to add metadata on their own datasets." - what is the metadata and what is the resistance?

If you're coming in and asking for a bunch of federated governance effort without getting buy-in on the value, that's pretty reasonable stakeholder behavior. I'd second the "do as much as you can with logging/auditing", get some top-line $$$ number before asking for work (as long as it's loosely defensible), and focus that where the human effort is clearly high ROI vs the scream test approach of "you take your best guess and be ready to pivot if shutting stuff off causes problems".

The tripwires to find out SUPER early are anything legal/finance/compliance related if it exists, and make sure you silo that and deal with it separately. The ROI rules end up very different for those departments and your waste might not be their waste.

2

u/brickkcirb 7d ago

get some top-line $$$ number before asking for work (as long as it's loosely defensible), and focus that where the human effort is clearly high ROI vs the scream test approach

Thanks, this I feel is the right approach, one am planning to try.

6

u/Outside-Storage-1523 7d ago

You have to, as they said, obtains some small wins to gain trust, and then do your stuffs. It’s a human problem.

5

u/brickkcirb 7d ago

It’s a human problem.

I agree.

5

u/flashman1986 7d ago

Second the comment about turning stuff off (what looks unimportant to you). Send out warning emails to people who might be impacted. Notify that silence is consent. You’ll need to do a good chunk of UR to understand what people are actually using, as you say.

Candidly, you need to tell people that you have to assign data owners. This role should have power (decide how the data is used) and responsibility (maintain metadata etc). If they don’t want to be a data owner despite being the obvious person, you will decide how the data is used (that includes deleting it)

You need to start telling people that if data is unowned in (say) 12 months, it is going to be deleted.

What does the governance/metadata look like, on a scale of 1-10?

Longer term, I think you’ll need to rationalise the tech stack, otherwise you’ll never maintain all these pipelines

2

u/brickkcirb 7d ago

Send out warning emails to people who might be impacted. Notify that silence is consent. You’ll need to do a good chunk of UR to understand what people are actually using, as you say.

I should first find out who those are first.

3

u/NW1969 7d ago

Given that no-one operates in an "ideal world", I would question why you are attempting to do this, especially if there is internal resistance from business. If the processes work why do you want to change them? What does the business want you to work on and would that provide more value?
If you think there are genuine risks to the business with the platform as it stands then produce an evidence-based report that explains what the issues are, their likelihood of happening and the impact/cost to the business if they do happen. Give this to the appropriate members of the SLT and let them decide if it is a business priority for any of the issues to be addressed

2

u/brickkcirb 7d ago

Good questions, I do not have concrete answers to these other than to save $ and make management easier, and in time get promoted :). On a serious note, its extremely hard to find datasets and managing the platform is a nightmare.

1

u/NW1969 6d ago

So you need to explain these issues to your SLT in terms that are relevant to them (cost to the business, not that they make your job harder) and get sponsorship from them to address these issues

2

u/peeyushu 7d ago

do your homework
build a plan
present with risks of not doing, cost of doing

The first step will take the most time, but 2 & 3 are equally important. If you have buy-in great, else start looking for your next job. The risky thing would be to stand still and patching things as they start failing -soul sucking and detrimental to career.

1

u/Prickly__Goo 7d ago

Hire a consulting company to help your successful publicly traded company.

1

u/OkProject8737 7d ago

I think that mapping everything is the right move. Ask teams what data sources they’re using and how often, but be sure to give them a limit date to give you the information or else they won’t. Ask me how I know this…. Once you have that start bringing everything together.

1

u/GreyHairedDWGuy 6d ago

Look for a new job is my suggestion.

1

u/randomuser1231234 6d ago

Not my tool, but you need lineage. OpenMetadata is OS.

1

u/Yuki100Percent 5d ago

Why not have LLMs look at pipeline usage and suggest what to decommission etc?

1

u/[deleted] 7d ago

[removed] — view removed comment

1

u/dataengineering-ModTeam 4d ago

Your post/comment was removed because it violated rule #9 (No AI generated content/text).

Your post/comment was reviewed to be AI generated/assisted content/text and removed as a result. We as a community value human engagement and encourage users to express themselves authentically.

This was reviewed by a human

1

u/[deleted] 6d ago

[removed] — view removed comment

1

u/dataengineering-ModTeam 3d ago

Your post/comment was removed because it violated rule #6 (No recruiting, solicitation, or networking posts).

We do not intend for this space to be a place where people ask for, or advertise:

  • Job postings - Please use r/dataengineeringjobs instead.
  • Study groups
  • Referrals
  • Mentors or study partners
  • Requests to fill in surveys
  • Market research
  • Beta testers wanted
  • Voucher offers/discounts
  • "Does anybody need this tool?" or "looking for feedback" type posts

This was reviewed by a human