TapCub is live — analytics, insights and live chat, free on one platform
Glossary

Data Granularity: What One Row Represents and How Fine to Collect

Data granularity is what one row of your data represents: one event or one daily total. A recomputable example where weekly and daily grains give opposite answers, decision rules for choosing a grain, and the storage and privacy costs of going finer.

Chen Yu Reviewed by Su He Also called grain Last updated Nov 16, 2026 Glossary

Quick answer

Data granularity is the level of detail a dataset stores: what one row represents, from one row per event with timestamp, user and properties (fine) to one row per day of totals (coarse). Fine data rolls up to coarse; coarse never splits back, so grain is set at collection time.

Formula: Rows per month = events per day × days (event grain), or buckets per day × days (rollup); storage ≈ rows × bytes per row

What is data granularity?

Data granularity is the level of detail a dataset stores: what one row represents. The Kimball Group calls this the grain of a fact table: a binding contract declared before you pick dimensions or measures. A table whose grain is "one signup event" is fine-grained: every row carries a timestamp, a user and event properties. A table whose grain is "one day" is coarse-grained: on a day with 2,000 events, the event-level table holds 2,000 rows while the daily table holds 1.

The trade-off runs in one direction only. Fine data can always be rolled up into coarse data; coarse data can never be split back into fine data. That makes granularity a collection-time decision, not a reporting-time one: collect too coarse and the missing detail is unrecoverable, collect too fine and you pay for it in storage and privacy. Rows you never stored are raw data you can never export later.

Three axes: time, dimension, identity

Most explanations stop at time granularity, but a row's grain is set along three independent axes. You can hold daily totals (coarse time) yet split them by SKU (fine dimension), or keep every event (fine time) but only as anonymous counts (coarse identity).

AxisCoarse → fineWhat finer rows let you answer
Timemonth → week → day → hour → event timestampNot just "did signups drop this week" but "which hour collapsed". Apache Druid buckets timestamps into UTC granularities from second to year; PostgreSQL's date_trunc('hour', …) or date_trunc('day', …) performs the same fine-to-coarse truncation in SQL.
Dimensioncountry → city → street; category → SKUWhich city or which product drove the change, instead of a national or catalog-wide average. Each event property you collect adds one dimension you can slice by.
Identityanonymous totals → account → user → session → eventWhether the same person came back, which account churned, what one session did before an error — none of this survives in anonymous counts with no persistent ID.

Do not confuse granularity with cardinality: granularity is what one row represents; cardinality is how many distinct values a column takes. A table can have one row per event (fine grain) and a country column with only 3 values (low cardinality). Defining which properties each event carries is the job of an event schema.

Worked example: same data, different answers

Sample data: a site's sessions and signup conversions over 14 days, split by day type.

SegmentWeek 1Week 2
Weekdays5 × 1,000 sessions, 50 conversions/day → 250/5,000 = 5.0%5 × 1,000 sessions, 55/day → 275/5,000 = 5.5%
Weekend2 × 200 sessions, 4 conversions/day → 8/400 = 2.0%2 × 1,000 sessions, 22/day → 44/2,000 = 2.2%
Weekly total258/5,400 = 4.78%319/7,000 = 4.56%

Read at weekly grain, conversion fell 0.22 percentage points: "the funnel got worse." Read at daily grain split by day type, both segments improved (5.0% → 5.5% and 2.0% → 2.2%). What changed is the mix: weekend sessions went from 400/5,400 = 7.4% of traffic to 2,000/7,000 = 28.6%, and that low-converting traffic diluted the average. Same rows, opposite conclusions — the weekly rollup had thrown away the day-type dimension needed to tell a product problem from a traffic-mix shift.

Now a debugging question: "why did day-3 signups drop?" Assume 2,000 events/day for 30 days (sample data). What each stored grain can answer:

Stored grainRows/monthWhat you can seeWhat stays invisible
Daily totals30Day 3 had 40 signups vs the usual 60Which hour; which step; which users
Hourly rollup24 × 30 = 720The collapse ran 14:00–16:00Why: no error codes, no paths
Event level2,000 × 30 = 60,000Rows with error_code=502; rebuild the session path to the failing stepNothing about this question

The storage math (sample sizes: 200 bytes/event row, 120 bytes/rollup row): 60,000 × 200 B ≈ 12 MB; 720 × 120 B ≈ 86.4 KB; 30 × 120 B ≈ 3.6 KB per month. Event level costs 2,000× the rows of daily and about 83× the rows of hourly. Cheap in absolute terms here — but multiply by your real traffic and every property you add.

Choosing a grain: decision rules

Four if-then rules:

  1. Declare the grain before you build the table or the tracking plan. Write "one row represents …" first; dimensions and measures follow. Kimball treats the grain as a contract because everything downstream assumes it. A tracking plan is where that declaration lives on the collection side.
  2. If the questions are not yet known, collect at atomic grain. Event-level rows answer questions you have not thought of; every rollup can be computed later with date_trunc + SUM. A pre-aggregated table has already baked in a guess about which questions matter.
  3. If the questions are fixed and known, coarse is enough. A daily KPI dashboard does not justify keeping every event indefinitely; collect or retain at the grain you will actually query.
  4. Treat coarse as irreversible, and keep one grain per table. You cannot recover hours from days. And per Kimball, different grains belong in different physical tables — never mix event rows and daily totals in one table, or every query needs a filter just to avoid double counting. Rolling fine into coarse is the operation covered in data aggregation; this page is about choosing the grain in the first place.

Storage, privacy and retention

Fine grain has three costs:

  • Storage and query cost. From the math above, event level is ~12 MB/month per 2,000 daily events versus ~3.6 KB for daily totals, growing linearly with traffic and row width. At warehouse scale the layout matters too: BigQuery time-unit column partitions can be hourly, daily, monthly or yearly, and that partition granularity determines how much data a date-filtered query scans — and what you pay.
  • Privacy exposure. Event rows with a persistent user ID and properties are personal data. GDPR Article 5(1)(c) requires personal data to be "adequate, relevant and limited to what is necessary" (data minimisation), and Recital 39 says storage periods should be limited to a strict minimum. The finer the identity grain you keep, the stronger your justification needs to be. (This is an engineering summary, not legal advice.)
  • Retention asymmetry. A common pattern — and TapCub's behavior — is that raw detail past the retention window is deleted and unrecoverable, while anonymous daily aggregates contain no personal data and survive. Retention effectively coarsens your history over time: last week you can debug at event level, last year only at daily totals. Plan exports before the window closes, and see collection tiers for how identity grain is set at collection.

Common mistakes

  • Averaging rates instead of weighting them. The unweighted mean of week-1 daily rates is (5 × 5.0% + 2 × 2.0%)/7 = 4.14%, but the true weekly rate is 258/5,400 = 4.78%. When you roll up, recompute from sums (conversions ÷ sessions), never from an average of averages.
  • "Finer is always better." Finer is more optionality, at a real storage and privacy price. Collecting detail nobody queries pays both costs for nothing.
  • Confusing granularity with cardinality. Adding a high-cardinality column does not make the grain finer, and one-row-per-event does not make every column high-cardinality. They are separate properties; see cardinality.
  • Changing grain mid-project. If month 1 is stored per session and month 2 per event, the periods are not comparable and trend charts silently break. Keep one grain per table; version any change explicitly.

Data granularity in TapCub

Take the worked example: your weekly report says conversion "got worse" (4.78% → 4.56%), and you have to decide whether it is a product problem or a traffic-mix shift. In TapCub the investigation walks down the grain ladder, and how far down you can go was decided when the data was collected and how long it was kept.

  1. Change the time grain before you change the conclusion. In All-platform analytics › Behavior › Behavior analysis, the builder's granularity is auto, hour, day, week or month. Put sessions and the signup conversion on one chart and switch from week to day: week 2's two weekend days jump from 200 to 1,000 sessions while converting near 2%, which is the mix shift from the example, not a broken funnel.
  2. Drop to hours, then to rows. Switch granularity to hour to find the 14:00–16:00 collapse from the debugging example. To see which events carried error_code=502, open the SQL tab in the same builder and query the v_events view for that window; results return up to 50,000 rows.
  3. Export before retention coarsens your history. Event rows are kept for the project's retention days (365 to start with, capped by the plan) and then deleted; daily aggregates contain no personal data and are not deleted on that timer. Last week can be debugged at event level, last year only at daily totals. If you may need the rows later, create an async export job in All-platform analytics › Data › Data export while they still exist.
  4. Choose the identity grain at collection. Configuration › Privacy center sets the collect tier: tier 1 is an anonymous aggregate (the salt rotates daily, no persistent ID, autocapture and identity calls dropped), tier 2 is the default cookie-free pseudonym, and tier 3 can use a device ID and login only when the project is in identified mode. In the EEA and UK, a hit without analytics consent falls to tier 1, and pageviews and custom events are still stored. "Which user did this" cannot be answered later for hits collected at tier 1.

The console has no raw-row browser outside SQL and export, and TapCub cannot recreate rows it never stored or already deleted. That is the thesis in product form: decide the grain at collection, because coarse data cannot be split back into fine data.

See also: Aggregation Definition: What It Means and How It Misleads.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Chen Yu

Technical Engineer

Focuses on tracking code, SDKs, and API integrations, with practical guidance on implementation checks and troubleshooting.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is data granularity?

Data granularity is the level of detail a dataset stores — what one row represents. One row per event, with a timestamp, user and properties, is fine granularity; one row per day holding totals is coarse. On a day with 2,000 events, the event-level table has 2,000 rows and the daily table has 1.

What is the difference between fine and coarse granularity?

Fine granularity stores many small units, such as one row per event with timestamp, user and properties; coarse granularity stores summaries, such as one row per day. The key asymmetry: fine data can be rolled up to coarse at any time with date_trunc and SUM, but coarse data can never be split back into fine.

Is finer granularity always better?

No. In the worked example, event level costs 60,000 rows (~12 MB) per month versus 30 rows (~3.6 KB) for daily totals, and personal detail brings GDPR data-minimisation and retention duties. Collect atomic detail when questions are unknown; otherwise use the coarsest grain that answers them. Detail nobody queries is storage and privacy cost for nothing.

How is granularity different from aggregation?

Granularity is a state: how detailed the stored rows are. Aggregation is the operation that moves data from fine to coarse, such as summing events into daily totals. You choose granularity when designing collection; you apply aggregation when querying or rolling up. See data aggregation for the operation itself.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics