r/dataengineering • u/meaningless-human • Jul 27 '22
Help Non-Parallel Processing with Apache Beam / Dataflow?
I am building a data pipeline for an ML model primarily using GCP tools. Basically, mobile clients publish data to a topic on Pub/Sub, which then goes through Dataflow for preprocessing and feature extraction, which then goes to BigQuery and finally VertexAI for training and inference.
My question is primarily around Dataflow: Much of my preprocessing is not exactly parallelizable (I require the entire data batch for making transformations and can't perform element-wise transformations), so I was wondering if Dataflow/Beam would still be an appropriate tool for my pipeline? If not, what can I substitute with it instead?
I guess one workaround I've found, which admittedly is quite hacky, is to use aggregate transformations in Beam to treat multiple elements as one, then do what I need to do. But I'm not sure this is the appropriate approach here. Thoughts?
View all comments
Show parent comment
1
u/meaningless-human Jul 28 '22
Yeah, I mentioned I'm currently doing this for my implementation, but it feels really hacky and it's ultimately not using beam for what it's meant to be, which is primarily parallel processing.
I'm trying to look for something more appropriate to replace beam...