Introducing Onehouse Autopilot to run your data platform for you. Check out the demos

Move your EMR Spark job to Onehouse without rewriting it

Your EMR Spark job, on Onehouse. No rewrite. The same daily job, daily_price_history.py with a few Spark settings, is copied from Amazon EMR to Onehouse, powered by Quanton, with no code change; both read the daily prices and write the price history in the same S3 bucket, and the output has the same rows and an empty diff.

TL;DR

Most of an EMR Spark job already lives in S3: the script, the input data and the output table. EMR is the machines that run it. We moved a daily PySpark job, which builds a 52-week price history from 543 million rows of daily stock prices (about 30 GB in S3), from Amazon EMR 7.14 to Onehouse by pasting the EMR step's script path and Spark settings into a Onehouse job, on a Spark cluster powered by Quanton in the same AWS account and region. One test run into a test folder gave the same 543,063,446 rows as EMR, and an EXCEPT in both directions came back empty. Then we pointed the job at the real table, moved the daily trigger and shut down EMR. The next morning's query read the table as before. On the standard TPC-DS 10 TB benchmark, Quanton is 3.2x faster than EMR on reads; on writes, published benchmarks show it about 4x faster than open source Spark on merges and compaction. The gain varies by job: this one, on the same three machines, built its table in 5:18 on Onehouse and 26:01 on EMR, 4.9x faster.

Move your EMR Spark job to Onehouse without rewriting it

If you run Apache Spark™ on Amazon EMR, you’ve probably thought about moving off it. And then put it off, because it sounds like weeks of work: learn the nuances of a new platform, move the data, rewrite the jobs.

This post moves one real daily PySpark job from EMR to Onehouse without changing a line of code. The job keeps its script, its Spark settings and its data in S3. We run it once into a test folder, check it against what EMR wrote, and then switch over.

The problem: it sounds like weeks of work

A migration plan for a Spark job usually has three big items on it: get to know the new platform, copy the data over, and port the jobs. Each one is a project, so the plan slips a quarter, then another.

Look at what an EMR job actually is, though. The script, the raw data it reads and the table it writes are all in S3. EMR is the machines that run the job, plus a step that says which script to run with which settings. Nothing in S3 has to move. What you need to bring over is the step.

The result

Here’s what the move looked like for our job:

Item Result
Code changes none; the same daily_price_history.py from S3
Data moved none; the input and output stay in the same S3 bucket
Spark settings the same four --conf values as the EMR step
Machines 3 × m8gd.2xlarge on both sides
Test run vs EMR 543,063,446 rows on each side, and an empty diff in both directions
Queries after the switch the next morning’s query read the table as before
Standard benchmark, TPC-DS 10 TB Quanton 3.2x faster than EMR on reads
Time to build the table, this job EMR 26:01, Onehouse 5:18 (4.9x faster for this job), from the job’s own log, start-up excluded

Step 1: read the EMR step

Here’s one of ours. The daily_price_history job runs every day on the latest EMR, 7.14:

aws emr list-steps: the daily_price_history step, RUNNING, started 2026-11-22 at 22:21:19

Right now, it runs on this cluster, on EMR 7.14:

aws emr describe-cluster: adhoc_three_node_emr_7_14, release emr-7.14.0, state RUNNING

The job reads the daily stock prices, 543 million rows of them, and works out each stock’s 52-week high and low for every trading day: a rolling window over the last 365 rows for each stock. It writes the result as the price history table, in Parquet, that the dashboards read. The script and about 30 GB of daily prices are in S3, the full history in Batch1 and the daily batches after it:

aws s3 ls: stock-prices/code/ holds daily_price_history.py; stock-prices/raw/daily_prices/ holds the folders Batch1, Batch2 and Batch3, 3 objects and 29.7 GiB in total; bucket name blurred

And here’s what EMR runs every day: a script in S3, four Spark settings, and where to read and write. That’s what we need to repurpose, and none of it changes:

aws emr describe-step: spark-submit with spark.executor.instances=4, spark.executor.cores=4, spark.executor.memory=10g and spark.executor.memoryOverheadFactor=0.1, the script daily_price_history.py in S3, --data stock-prices/raw/daily_prices/ and --output stock-prices/tables/price_history/; bucket name blurred

Note one more thing about the cluster: the AWS account and region it runs in. Its ARN shows us-west-2 and an account that ends in 08:

The EMR cluster ARN: us-west-2, an account ID masked except for its last two digits 08, and the cluster ID masked

Step 2: recreate it on Onehouse

Same data plane as EMR

Now over to Onehouse. In the Onehouse console, Project Settings → Data Plane shows where this project runs: in that same AWS account, ending in 08, and the same region. So it sees the same S3 bucket and the same files. The c0b849e5 in the cluster name is also in the name of the bucket that holds the job’s script and data:

Onehouse Project Settings, Data Plane: region us-west-2, EKS cluster name onehouse-customer-cluster-c0b849e5, and an ARN in the account ending 08; account ID masked except for its last two digits, VPC ID blurred

Create a Spark cluster

In the Onehouse console, open Clusters from the sidebar, click Add New Cluster, and pick Spark as the type:

New Cluster named stock-analytics: the Cluster Type list with Managed, SQL, Spark, Open Engines, Notebook, Lakegres and Table Optimizer, with the pointer on Spark

We named it stock-analytics and chose the same machines as the EMR cluster, m8gd.2xlarge, on demand:

The new Spark cluster form: catalog glue_irc, Max OCU 6, Min OCU 4, worker type m8gd.2xlarge, driver type Auto, On-Demand, Quanton Enabled; account ID masked except for its last two digits

It’s powered by Quanton, the Onehouse engine for Apache Spark, and it runs in our own AWS account, so it sits right next to the data:

Cluster details for stock-analytics: Spark, Running, driver and worker type m8gd.2xlarge, On-Demand, Quanton Enabled; the AWS ARN shows only the last two digits of the account ID

Create the job with the same configuration

Then create a job with the same configuration as on EMR. Under Jobs, add a Python job named daily-price-history on the stock-analytics cluster, and paste in the script and the Spark settings from the EMR step, exactly as they were. For the test run, --output points at a test folder:

Create Job: name daily-price-history, type Python, cluster stock-analytics, and raw parameters with the four --conf settings, the daily_price_history.py script in S3, --data and --output pointing at a test folder; bucket name blurred

The parameters are the EMR step’s arguments, minus spark-submit and the deploy mode:

[
  "--conf", "spark.executor.instances=4",
  "--conf", "spark.executor.cores=4",
  "--conf", "spark.executor.memory=10g",
  "--conf", "spark.executor.memoryOverheadFactor=0.1",
  "s3://<your-bucket>/stock-prices/code/daily_price_history.py",
  "--data", "s3://<your-bucket>/stock-prices/raw/daily_prices/",
  "--output", "s3://<your-bucket>/stock-prices/test/price_history/"
]

Step 3: one test run, checked against EMR

Before we switch anything, let’s run it once and write the table to a test folder, so the real table isn’t touched:

The daily-price-history job in Onehouse: executable path daily_price_history.py in S3, and a run on stock-analytics, Completed in 6 min 49 sec, 22 Nov 2026 10:29 to 10:36 PM

The run takes 6 minutes 49 seconds in the list. About a minute of that is the cluster starting machines for the job, because this was the first run on a new cluster.

Then check it against what EMR wrote. We registered the test folder as a table and compared the two in Amazon Athena. One query gives the row count on each side, and an EXCEPT in each direction, over every column, counts the rows that are only in one of the tables:

-- Same row counts, and nothing in one table that isn't in the other
SELECT
  (SELECT count(*) FROM stock_prices.price_history)      AS emr_rows,
  (SELECT count(*) FROM stock_prices.price_history_test) AS onehouse_rows,
  (SELECT count(*) FROM (SELECT * FROM stock_prices.price_history
                         EXCEPT SELECT * FROM stock_prices.price_history_test)) AS only_in_emr,
  (SELECT count(*) FROM (SELECT * FROM stock_prices.price_history_test
                         EXCEPT SELECT * FROM stock_prices.price_history))      AS only_in_onehouse

Same row counts, 543,063,446 on each side, and the diff comes back empty:

Amazon Athena: emr_rows 543063446, onehouse_rows 543063446, only_in_emr 0, only_in_onehouse 0

Pick any stock and any day, and the 52-week high and low are the same on both. Here’s one, side by side. The dataset pads every ticker with filler characters, so the query shows the last five with substr:

-- One stock, one day: the same 52-week high and low from both runs
SELECT 'EMR' AS written_by, substr(symbol, 11) AS ticker, price_date, close,
       high_52w, high_52w_date, low_52w, low_52w_date
FROM stock_prices.price_history
WHERE substr(symbol, 11) = 'BCQYD' AND price_date = DATE '2017-07-08'
UNION ALL
SELECT 'Onehouse', substr(symbol, 11), price_date, close,
       high_52w, high_52w_date, low_52w, low_52w_date
FROM stock_prices.price_history_test
WHERE substr(symbol, 11) = 'BCQYD' AND price_date = DATE '2017-07-08'
Amazon Athena: BCQYD on 2017-07-08 from both tables, Onehouse and EMR: close 978.46, 52-week high 1416.13 on 2017-07-08, 52-week low 2.38 on 2017-01-11

Step 4: switch over

Then point the job at the real table: edit the job and change --output from the test folder to the table path EMR wrote to:

Editing daily-price-history: the same parameters, now with --output pointing at the real table, stock-prices/tables/price_history/; bucket name blurred

Move the daily trigger over to it. Onehouse jobs start from the console, the API or SQL, so whatever starts the EMR step each day now starts the Onehouse job instead. And shut down the EMR cluster:

aws emr describe-cluster: adhoc_three_node_emr_7_14 in state TERMINATED, ended 2026-11-22 at 23:21:32

Next morning, the dashboards that read this table work as before, without any change. Here’s one of their queries in Athena, the stocks that closed the latest day at a new 52-week high, on the table Onehouse wrote:

-- Next morning: stocks that closed the latest day at a new 52-week high
SELECT substr(symbol, 11) AS ticker, price_date, close, high, high_52w, volume
FROM stock_prices.price_history
WHERE price_date = (SELECT max(price_date) FROM stock_prices.price_history)
  AND high = high_52w
ORDER BY volume DESC
LIMIT 4
Amazon Athena: four stocks at a new 52-week high on 2017-07-08, BCQYD, AYWHM, BRUBM and AJVGK, with close, high, 52-week high and volume, read from the price_history table written by Onehouse

How fast is it?

Start with the standard benchmarks. On TPC-DS at 10 TB, on Spark 4.1, Quanton ran the queries in 1,480 seconds, about 25 minutes. EMR took 4,725 seconds, about 79 minutes, so Quanton is 3.2x faster on reads. Apache DataFusion Comet and open source Apache Spark took 5.1x and 7x as long as Quanton:

Standard benchmarks. Reads, TPC-DS 10 TB on Spark 4.1, total query runtime: Onehouse Quanton 1,480 s, Amazon EMR 4,725 s (3.2x slower), DataFusion Comet 7,508 s (5.1x slower), open source Apache Spark 10,506 s (7x slower), on 11 m8gd.4xlarge machines. Writes, against open source Apache Spark (LakeLoader 1 TB and Iceberg compaction): 4x faster merges and 4x faster compaction
Engine TPC-DS 10 TB, total runtime Compared with Quanton
Onehouse Quanton 1,480 s -
Amazon EMR 4,725 s 3.2x slower
Apache DataFusion Comet 7,508 s 5.1x slower
Apache Spark (open source) 10,506 s 7x slower

These are the published TPC-DS results from November 2026, on 11 m8gd.4xlarge machines: Quanton on Spark 4.1, Amazon EMR 8.1, tuned Comet and open source Spark 4.1.3. The EMR total leaves out Q30, which did not run against this dataset.

Writes are faster too. Against open source Spark, Quanton is about 4x faster on merges (4.1x on load and update operations, LakeLoader at 1 TB) and about 4x faster on compaction; see our Apache Iceberg on Quanton benchmark.

These are standard benchmarks, and the gain on your own job depends on what the job does. So we also timed this same job on both sides, over about 30 GB of daily stock prices, on the same three m8gd.2xlarge machines, with the same script and Spark settings, in one session on 22 Nov 2026. The script prints how long it took to build the table, from reading the daily prices to the last Parquet file written, which leaves out the time machines take to start. EMR took about 26 minutes to build the table:

The EMR step daily_price_history: COMPLETED, started 22:21:19, ended 22:47:45, total 26:26; then the job's own lines: executors ready in 4.0 s, price history written in 1560.6 s, rows 543063446

Onehouse took just over five, thanks to Quanton. This is the run into the real table, after the switch:

The daily-price-history job's runs on stock-analytics, both Completed: the run into the real table, 6 min 56 sec, 10:55 to 11:02 PM, and the test run, 6 min 49 sec, 10:29 to 10:36 PM
The driver log of the Onehouse run into the real table, filtered on price history: price history written in 318.4 s
Amazon EMR 7.14 Onehouse, powered by Quanton
Time to build the table (the job’s own log) 26:01 (1,560.6 s) 5:18 (318.4 s)
Whole run, start-up included 26:26 6:56
Rows written 543,063,446 543,063,446

For this job, that’s nearly five times faster: 4.9x to build the table. Each side ran it once for the timing; the Onehouse test run earlier the same evening took 313.3 s, within a few seconds of the timed run. Counting the whole run as each platform reports it, start-up included, it’s 3.8x: the Onehouse cluster took about a minute to start machines for the run, while the EMR cluster’s machines were already up.

What will you get on your own jobs?

To see what Quanton would do for each of your jobs, run the free Cost Analyzer for Apache Spark (pip install spark-analyzer) against your Spark History Server. It reads the runs you already have and reports a Quanton estimate for each job. Some jobs get up to 6x faster; see See how much of your Spark compute sits idle.

Conclusion

Moving an EMR Spark job to Onehouse comes down to the step. The script, the data and the output table stay in S3, in the same AWS account. You create a Spark cluster on the same machines, paste the step’s script and Spark settings into a Onehouse job, and prove it with one test run before anything switches. In our run, the output matched EMR row for row, and the queries that read the table didn’t notice the change.

Other recommended blogs:

To try it on one of your own EMR jobs, start at onehouse.ai, or get in touch with our team at gtm@onehouse.ai.

Frequently asked questions

Do I need to change my PySpark code?

No. The Onehouse job runs the same script from S3. In our run, daily_price_history.py didn’t change at all.

Do I need to move my data?

No. The data plane runs in your own AWS account, so the Onehouse cluster reads and writes the same S3 bucket as EMR. The input data, the script and the output table stay where they are.

What do I copy from the EMR step?

The script path, the --conf Spark settings and the script’s own arguments, such as the input and output paths. spark-submit and the deploy mode stay behind.

How do I check the output before switching?

Run the Onehouse job once with the output pointed at a test folder, then compare it with the EMR table: the same row count, and an EXCEPT in both directions that returns no rows.

How do I schedule the job?

Onehouse jobs start from the console, the API or SQL. Point whatever triggers the EMR step today at the Onehouse job instead.

Which machines should I pick?

Start with the same instance type as your EMR cluster, so the comparison is fair. We used m8gd.2xlarge on both sides.

How much faster is Onehouse than EMR?

On the standard TPC-DS 10 TB benchmark, Quanton is 3.2x faster than EMR on reads. On writes, published benchmarks show it about 4x faster than open source Spark on merges (LakeLoader, 1 TB) and on compaction; see our Apache Iceberg on Quanton benchmark. The gain on a given job depends on what it does: the job in this post built its table 4.9x faster. To estimate it for your own jobs, run the free Cost Analyzer for Apache Spark (pip install spark-analyzer).

Read More:

Subscribe to the Blog

Be the first to hear about news and product updates

We are hiring diverse, world-class talent — join us in building the future