ExitAmazon EMR: data transformation with Apache Spark1 / 9
Explanation

From transaction files to model inputs

How Spark jobs on EMR use DataFrame transformations to turn raw data into feature datasets for machine learning. · associate

Amazon EMR runs Apache Spark jobs that process data across multiple workers. A Spark DataFrame represents distributed rows with named, typed columns. You describe operations on those columns rather than writing a loop over every record.

Here, raw transactions contain a transaction ID, customer ID, timestamp, and amount. The goal is a feature dataset with one row per customer and numeric columns such as purchase count and total spending. Preparing these features is separate from training a model.

The diagram shows the data flow, not the direction of API requests. Amazon S3 stores the input and output files; the Spark job on EMR performs the computation. The two S3 locations can be separate buckets or separate prefixes in one bucket.

Raw transactionsFeature files
Amazon S3 bucketRaw transaction files
Amazon EMRSpark DataFrame job
Amazon S3 bucketVersioned feature dataset

1 / 4 The raw S3 location holds transaction files. These are source records, not yet customer-level features.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.