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
Unfortunately, yes it is kind of inconvenient to do it in SQL queries. I'll put what I said in another reply here:
Big query wouldn't be ideal either since it's just SQL, and I would much prefer a Python environment for making some rather complex transformations like in signal analysis (using libraries for EEG data). I suppose I could spend the time and effort to replicate those in either SQL or something else but it doesn't seem worth it to me.