Domo

Partition a Domo Dataset In Place, Then Keep the Partition Count Under Control

October 15, 2026 · Updated

A question came up in the DOMO User Group: how do you trim a dataset with hundreds of millions of rows when the dataset was created through the API, without copying everything into a new dataset? One answer was that partitioning cannot be added after the fact, so you have to rewrite the data through Magic ETL into a new dataset. Another answer, from a voice note, was that it can be done in place.

We tested the second answer on a live Domo instance. It works, with caveats worth knowing. This article covers that, and then a second problem you hit once you start partitioning for real: too many partitions.

What partitioning is

An ordinary dataset is one block of rows. Every upload that replaces it rewrites all of it. Fix one wrong row from March and you send the whole table again.

A partitioned dataset is cut into labelled slices. Each upload carries a tag, and Domo replaces only the slice with that tag. The other slices are not touched.

One block versus one slice per month. Uploading with the tag 2026-03 replaces only that slice.

That gives you two things.

  1. Cheaper updates. A nightly load rewrites yesterday's slice, not ten years of history. The work and the time scale with the slice, not the table.
  2. Retention. Dropping data you no longer need becomes deleting a slice. A rolling window of the last N months or years is a delete on a schedule, which means you stop paying to store and process rows nobody reads.

Why do it in place

The usual advice is to build a new partitioned dataset with Magic ETL and repoint everything. That works, but a new dataset has a new dataset ID. Every card, dataflow, alert and API consumer that points at the old ID has to be found and changed.

If the dataset was created through the API, you can keep the ID and change what is inside it. Nothing downstream moves.

Converting an unpartitioned dataset

The method from the voice note is: start writing partitions into the existing dataset, treat the data that is already there as the "null" partition, copy each row into the partition for its month, then delete the null partition. Duplicate the dataset first and script it, because there is a real chance of breaking the dataset.

We built that script and ran it against a copy on domo-community. The order of the steps matters, and each one exists because of something we observed.

Four steps: stage the rows locally, upload them tagged, verify the counts, delete the untagged copy.

1. Stage first. Read every month out to a local file before you write anything. After the first tagged upload, a query for that month returns each row twice, once from the original untagged data and once from the new partition. If you stage after you start, you stage duplicates.

2. Upload each month with its tag. A tagged upload is additive. The original rows stay where they are, so for a while every row exists twice. Anything downstream reading the dataset sees duplicates until step 4, and storage peaks at about double.

3. Verify before you delete. Compare each partition's row count with what you staged, and the dataset total with the original plus the staged rows. Nothing in step 4 is reversible, so a mismatch stops the run.

4. Delete the untagged data by its version ID, not by a tag. This is the part the thread disagreed about. The untagged rows have no tag, so there is nothing to name. Asking Domo to delete the tag null returns a 404 "Data tag not found". What works is listing the dataset's data versions, finding the one with no partition, and deleting that version by its ID. The tagged partitions are left alone.

Two more things we ran into.

  • Counts lag. After a commit, the row count catches up some time later, and queries return a 404 until the first index finishes. That fits how Domo's own product team describes it in this IDEA Exchange session: data is only ready to query once it is in Vault, the source of truth, and fully indexed in the engine. The script polls COUNT(*) until it reaches the expected number instead of sleeping for a guessed time.
  • Do not clear the original with an empty replace. Replacing an unpartitioned dataset with zero rows cleared the untagged rows but also made every partition invisible to queries, while the partition list still showed them. We did not find a reason and do not recommend it.

The script is resumable. It stages first, skips partitions that already hold the right row count, and treats a finished conversion as a no-op, so a crash halfway through means running it again. It refuses to touch a dataset that is not named POC_ unless you tell it you rehearsed on a verified copy.

What we have not tested: behaviour at hundreds of millions of rows, whether dataset history survives the conversion, and connector-managed datasets. Rehearse on a copy at your real size.

The next problem: too many partitions

Partition by month and the count is small. But the reason people reach for partitioning is usually finer than that. Say you load orders daily and want to repair one state on one day without touching anything else. Partition by day and by state, with 50 states, and you create 50 partitions every day. After about two months you are at Domo's limit of 3,000 partitions per dataset.

Even month by state, which feels modest, reaches 3,000 after five years.

Partitions after 12 months to 10 years with 50 states. Month by state passes the 3,000 limit at five years. A rolling scheme stays near 160.

The observation that fixes this is that you only need fine slices where the data is still changing. Last week's orders for Texas might be corrected. Orders from two years ago will not be, and nobody repairs one state on one day in 2024.

Rolling windows

Keep three tiers.

Three tiers: yearly partitions for old data, monthly partitions for settled months, and per-state partitions for the last three months.

Tier Tag Holds
Hot hot_2026-06_CA the current month and the two before it, one partition per state
Warm mon_2026-03 one older month, all states together
Cold yr_2025 one complete older year, all months and states together

Once a month, after the load, a roll looks at which tags exist and folds whatever left the hot window. A month that is now three months old is read out of its state partitions and written as one month partition. When a whole calendar year has left the window, its twelve month partitions are read out and written as one year partition. With 50 states the count sits near 160 whether you have kept one year of history or ten.

Optionally, the same job drops year partitions older than a retention limit. That is the cost saving: old data leaves on a schedule, with no one-off cleanup project.

A tag holds one part

The design depends on something we had to measure. If you upload to a tag that already exists, does Domo add the new rows to that tag, or replace what was there?

It replaces. We uploaded three rows under the tag 2026, then two rows under the same tag, and the count was two. We ran it twice with the same result. A REPLACE under one tag leaves every other tag as it was, which is what makes per-tag repair safe.

So you cannot grow a year partition one month at a time. Adding March to a year partition means rewriting the whole year. The scheme avoids that by writing each year once, when it is complete, and each month once, when it leaves the hot window. Every row is rewritten at most twice in its life: hot to month, and month to year. The alternative, keeping a running year-to-date partition, rewrites every row in the year on every roll.

The fold

Each fold uses the same sequence as the in-place conversion.

  1. Read the rows being folded to a local file. Late-arriving rows for an old month sit in the target partition already, and they are read too, so they are rewritten and never duplicated.
  2. Upload them under the target tag.
  3. Check that the target's row count matches what was staged.
  4. Delete the partitions that were folded.
  5. Index, and wait until the dataset total is what it should be before the next step.

The last step matters more than it looks. A year fold reads its rows with a query, and a query that runs before the previous fold's commit has landed would read stale rows. Each fold is confirmed before the next one starts.

Between steps 2 and 4 the folded rows exist twice, so run the roll when nothing is reading the dataset, after the nightly load.

The planner that decides the folds is a plain function: tags and the current month in, a list of folds and drops out. It never calls Domo, so every rule, including the year boundary and late rows for a closed year, has an offline test.

Replaying 18 months

We ran the roll against a throwaway POC_rolling_ dataset on domo-community: eight states, forty orders per state per month, one simulated month per tick starting in January 2025. Each tick loads the new month as hot partitions, runs the roll, and then checks the dataset against the rows we sent: the total, that no order_id appears twice, the per-month counts and sums, and that the partition count equals what the arithmetic predicts.

The run finished all 18 ticks.

Month loaded Partitions Naive (month by state) Folded this tick Rows rewritten
2025-01 8 8 none 0
2025-02 16 16 none 0
2025-03 24 24 none 0
2025-04 25 32 mon_2025-01 320
2025-05 26 40 mon_2025-02 320
2025-06 27 48 mon_2025-03 320
2025-07 28 56 mon_2025-04 320
2025-08 29 64 mon_2025-05 320
2025-09 30 72 mon_2025-06 320
2025-10 31 80 mon_2025-07 320
2025-11 32 88 mon_2025-08 320
2025-12 33 96 mon_2025-09 320
2026-01 34 104 mon_2025-10 320
2026-02 35 112 mon_2025-11 320
2026-03 25 120 mon_2025-12, then yr_2025 4,160
2026-04 26 128 mon_2026-01 320
2026-05 27 136 mon_2026-02 320
2026-06 28 144 mon_2026-03 320

Every tick passed every check: totals match, no duplicate orders, per-month sums match the rows we sent, and the partition count matched the model. A shorter earlier run with three states and five months passed the same checks.

The pattern is the intended one. For the first three months every state gets its own partition. From the fourth month on, each tick folds the month that left the window into a single partition and the count grows by one a month instead of by eight.

The year fold ran live at the 2026-03 tick, when all of 2025 had left the hot window. That tick first folded December 2025 into mon_2025-12, then read the twelve 2025 month partitions and wrote them as one yr_2025 partition. The count dropped from 35 to 25, against 120 for month by state. The checks after the fold passed: the dataset total, the per-month counts and sums, and the duplicate check all matched what we sent. By the last tick, 2026-06, the dataset held 28 partitions against a naive 144. It grows by one a month until 2026 folds the same way at the 2027-03 tick.

That tick is also the expensive one. It rewrote 4,160 rows, a whole year plus one month, against 320 on an ordinary tick. Plan for the March roll each year to rewrite about a full year of rows.

Nothing here says how the scheme behaves at hundreds of millions of rows. The roll rewrites each folded month in full, so the time a fold takes grows with the size of the month. Test it at your real volume before you schedule it.

Try it

The in-place conversion and the roll are runbooks in crew-dcs, our Python library for the Domo API. Both start with a dry run that prints what they would do, and both refuse to touch a dataset that is not named POC_ without an explicit flag.

  • Convert an existing dataset: the partition-in-place runbook.
  • Keep the partition count bounded: the rolling-partitions runbook.

The question and the video are linked above. The partition semantics here come from tests we ran against a live instance, and the guides say which claims are proven and which are still observation. If you try this on a large dataset, we want to hear what changes at scale.

How this article was made: Claude, an AI assistant, ran the tests and wrote the draft for Jae at DataCrew. Every result in it comes from runs on the domo-community instance with crew-dcs; the guides in the repo say which claims are proven and which are observation.

Related

ⓘ

More posts on similar topics.

Got a project in mind?

hire me →

Want to talk this through with other Domo practitioners?

free Slack community — not affiliated with Domo, Inc.

💬 join the Domo User Group →

Getting value from the content but not ready to hire?

let's call it professional development

☕ buy me a coffee →

Want a practitioner take on Domo and AI, every month?

free, no spam, unsubscribe anytime

📰 subscribe to the digest →