Skip to main content

Gold Models

45 models in the epm_gold schema, read by the konsol API and the Excel add-in through Datasets. Each model is tagged domain:<scope> in dbt_project.yml (the konsol-managed model domains block, generated from konsol's Build Model / Build Scope doctypes); the sections below follow those scopes. For each model: what the SQL computes, what it reads, its grain, and the tests that hold it.

Unless noted a model is a plain MergeTree() table rebuilt on every run. Three are incremental with a scope delete (gold_consolidated_trial_balance, gold_cash_flow_indirect, gold_ytd_trial_balance); two are views (gold_consolidated_fact, gold_cashflow_fact). Dimension columns (dim_*) are whatever the site declares; they may be none.

Run-scope filters. period_filter() and scope_filter() (macros/orchestrator_filters.sql) are opt-in: with no fiscal_year / fiscal_period / entity_scope var a full build is byte-for-byte unchanged. A scoped close from konsol's orchestrator narrows the three incremental models to its slice, deletes that slice first (konsolidat#154), and appends; every other slice stays.

Actuals (domain:actuals)​

gold_trial_balance​

Period-level trial balance: silver_gl_entries grouped by entity, year, period, account (with name, type, is_balance_sheet, is_pnl) and the declared dimensions, measures from measure_select() (var('base_measures'): period_debit, period_credit, period_net_amount = sum(debit) - sum(credit), transaction_count). Cluster-aware. Deliberately unscoped: it is the spine every other model reads, and gold_entity_ownership derives its period list from it.

Grain: entity × year × period × account × dimensions. Tests: assert_trial_balance_balances (warn), assert_period_net_equals_debit_minus_credit, assert_undeclared_accounts_in_trial_balance (warn).

gold_trial_balance_by_partner​

The same aggregation with one more key, partner_data_area_id (konsol#159), plus is_year_end_close = 1 on the rows of a synthesized year-end close (posting_layer = 'Year-end close', konsolidat#259). Only consolidation reads it (gold_consolidated_trial_balance); summing it over the partner gives gold_trial_balance. Kept separate so the YTD, prior-year and P&L models are not fanned out per partner.

Tests: assert_partner_grain_not_fanned_out.

gold_ytd_trial_balance​

Running sum of period_net_amount within (entity, year, account, dimensions) ordered by period, over gold_trial_balance, plus the period measures. Incremental (append): the pre-hook deletes the run's scope with period_filter(include_period=false) so a single-period close keeps every earlier period of the year in the window.

Columns: the trial-balance keys and measures, ytd_net_amount. Tests: assert_ytd_trial_balance_grain, assert_ytd_at_last_regular_period_equals_annual (warn: YTD at the year's last Regular period, from epm_staging.fiscal_periods, equals the sum of the Regular periods; the Closing period's close is left out).

gold_pnl_by_period​

gold_trial_balance where is_pnl = 1: entity, year, period, account, name, type, dimensions, the period measures. Test: assert_pnl_only_pnl_accounts.

gold_pnl_quarterly / gold_pnl_half_yearly​

P&L rows of gold_trial_balance joined to gold_period_hierarchy on fiscal_period and summed per fiscal_quarter (or fiscal_half): quarter_net_amount, quarter_debit, quarter_credit (half_*). Periods outside the quarter map (OPN, CLS) take the labels declared in fiscal_extra_periods.

gold_balance_sheet​

gold_trial_balance where is_balance_sheet = 1 with cumulative_balance: the running sum of period_net_amount per (entity, account, dimensions) ordered by year and period, across years (not reset each year). Test: assert_bs_only_bs_accounts.

gold_bs_movement​

From gold_balance_sheet: opening_balance = the previous row's cumulative_balance (lagInFrame, 0 for the first), period_movement = period_net_amount, closing_balance = cumulative_balance, plus the period measures.

gold_cash_flow_indirect​

Entity cash-flow statement, indirect method, from the signed gold_trial_balance (period_debit - period_credit per account, fiscal_period > 0). Because a balanced trial balance sums to zero, Σ(cash) = −Σ(non-cash), so every non-cash account contributes cash_flow_amount = -signed_movement: P&L accounts collapse into the Operating line Net Income; balance-sheet accounts take cf_category / cf_line_item from epm_staging.cash_flow_categories (Published rows); anything else lands in Operating Other Non-Cash Adjustments so the statement always ties. Accounts with is_cash = 1 are excluded and define the reconciliation target. Incremental (append) with the run-scope delete.

Grain: entity × year × period × cf_category × cf_line_item. Tests: assert_cf_categories_equal_net_change, assert_scoped_cash_flow_ytd_confined, assert_incremental_slice_preserved.

gold_consolidated_trial_balance​

The consolidation chokepoint: each entity's trial balance translated into its group's currency and weighted by ownership. Incremental (append); pre-hooks run governed_rate_guard() first (a currency without a usable governed rate stops the run before anything is deleted), add the columns later releases appended, then delete the run's scope.

What it computes, per row of gold_trial_balance_by_partner joined to gold_entity_ownership (every ancestor group, has_complete_chain = 1, method not equity/none), silver_entity_currencies, silver_main_accounts, and the group root row of epm_gold.consolidation_groups:

  • Rate from epm_staging.group_exchange_rates only (rate_period_map() maps a Closing period to its year's last Regular period). The account's declared fx_method decides (konsol#182): historical takes the as-of tranche from epm_staging.historical_equity_rates (closing before the first tranche); average the period Average; closing, and an undeclared account, the period Closing. A same-currency entity translates at 1. A missing, duplicated, zero or implausible rate is null, and throwIf fails the build (konsolidat#93).
  • Balance-sheet retranslation (konsolidat#257, decided 6 Oct 2026): a non-equity balance-sheet balance is carried at each period's closing rate. The model densifies each key over the entity's period spine and adds retranslation_amount = cumulative local balance before this period × (closing rate − previous closing rate). Equity (is_equity = 1) and average/historical accounts are never revalued (assert_equity_never_revalued, assert_bs_translated_at_closing_rate).
  • Year-end close (konsolidat#259, option #259-1, decided 6 Oct 2026): on the close rows silver_tb_movements synthesizes (is_year_end_close = 1), each P&L key is reversed to exactly its translated year-to-date and retained earnings takes the year's translated result, so the close period creates no CTA (assert_year_end_close_carries_no_cta, warn).
  • translated_amount = local_amount × translation_rate + adjustment; group_amount = translated_amount × ownership_pct; nci_amount = translated_amount × (1 − ownership_pct).

Columns: consolidation_group, data_area_id, fiscal_year, fiscal_period, main_account, account_name, account_type_name, is_balance_sheet, is_pnl, is_equity, dim_*, local_amount, accounting_currency, reporting_currency, ownership_pct, consolidation_method, closing_rate, average_rate, historical_equity_rate, translation_rate, translated_amount, group_amount, nci_amount, partner_data_area_id, uses_historical_rate, retranslation_amount (the last three appended in that order; the positional append depends on it).

Grain: group × entity × year × period × account × partner × dimensions. Tests: assert_translated_amount_formula, assert_group_amount_formula, assert_nci_plus_group_equals_translated, assert_nci_zero_for_full_ownership, assert_translation_follows_fx_method (warn), assert_translation_rate_resolved, assert_every_translated_currency_has_a_governed_rate (warn), assert_equity_uses_historical_rate, assert_equity_historical_rate_is_asof, assert_declared_historical_has_a_rate (warn), assert_historical_is_equity_only, assert_draft_excluded_from_consolidated, assert_incremental_slice_preserved.

gold_fx_revaluation​

The CTA plug, one row per group × entity × year × period: cta_amount = -sum(group_amount) over every account of gold_consolidated_trial_balance, so Σ(translated) + CTA = 0 and the consolidated balance sheet balances by construction (IAS 21). main_account and adjustment_type are the literal CTA. A same-currency entity's CTA is 0.

Columns: consolidation_group, data_area_id, fiscal_year, fiscal_period, reporting_currency, accounting_currency, adjustment_type, main_account, closing_rate, average_rate, cta_amount. Tests: assert_cta_not_zero_when_rates_differ, assert_cta_zero_for_same_currency.

gold_prior_year_comparison​

gold_trial_balance self-joined on fiscal_year = prior.fiscal_year + 1 (same entity, period, account, dimensions): current_amount, prior_year_amount (0 when none), yoy_variance_abs, yoy_variance_pct (null when the prior amount is 0). Test: assert_prior_year_comparison_grain.

Consolidation (domain:consolidation)​

gold_entity_ownership​

The one resolved answer to "how much of this entity does this group own in this period, and how is it consolidated" (F2). For every period an entity has data in (gold_trial_balance), ownership_resolution_ctes() walks the link closure konsol writes to epm_staging.consolidation_ancestry and, for each link, takes the epm_staging.ownership_periods row in force at the period date (ASOF on effective_date, end_date checked explicitly). The effective share is the product of the chain's percentages, one row per ancestor group (a 60%-owned subsidiary of an 80%-owned sub-group reaches the top at 48%); the weakest link's method governs.

Columns: consolidation_group, data_area_id, fiscal_year, fiscal_period, period_date, chain_depth, owner_group (immediate parent), has_complete_chain, outside_ownership_window (we know when we owned it and this is not it), effective_ownership_pct, direct_ownership_pct, consolidation_method (full, proportional, equity, none).

Tests: assert_ownership_chain_complete, assert_effective_ownership_is_path_sum (the effective share is the sum over paths of the product of each path's dated link percentages, konsol#117), assert_effective_ownership_in_range, assert_ownership_uses_effective_date, assert_entity_in_one_consolidation_node, assert_ownership_paths_acyclic, assert_method_declared_for_multi_path, assert_tree_node_reached_by_links.

gold_ic_reconciliation​

Intercompany reconciliation: one row per pair and period, the two sides of one intercompany balance (konsolidat#148, konsol#159; decisions of 13 Sep 2026). A side is (entity, partner, account) on an account flagged in epm_staging.intercompany_accounts (ic_account_map()); its other side is (partner, entity, counterpart). Sides are matched at 100% (translated_amount, never the ownership-weighted amount), so a difference is a real mismatch. A balance-sheet pair compares the balance to date, a P&L pair the period's movement (decision 14). Membership is resolved per period from the ownership chain (ownership_resolution_ctes() on a period spine): the first period both sides line-consolidate is a joined row, the first period one leaves is a left row with values 0 so every elimination to date reverses.

difference_cause: none (within materiality_floor()), fx (different functional currencies, or same currency and the local amounts net to zero), booking (same currency, local amounts do not net). match_status: matched, fx_difference (an fx difference on a P&L pair or in one currency), within_tolerance / over_tolerance against the group's ic_difference_tolerance (a cross-currency balance pair is judged against the tolerance, konsol#305-W3-5).

Columns: consolidation_group, fiscal_year, fiscal_period, entity_a, account_a, entity_b, account_b, basis, pair_event, currency_a, currency_b, local_a, local_b, balance_a, balance_b, group_balance_a, group_balance_b, share_a, share_b, matched_amount, difference, net_balance, residual_a, residual_b, difference_cause, ic_difference_account, tolerance, match_status.

Tests: assert_ic_reconciliation_matched, assert_ic_pair_basis, assert_ic_pair_left_is_reversed, assert_ic_difference_cause, assert_ic_difference_not_from_ownership, assert_ic_match_status_cases, assert_ic_account_in_one_pair, assert_ic_difference_account_in_chart (warn).

gold_ic_eliminations​

Two-legged elimination entries from gold_ic_reconciliation, each row netting to zero (debit_elimination ≤ 0 on debit_account, credit_elimination ≥ 0 on credit_account). Two elimination_views: group (what gold_fully_consolidated_tb books) and nci (the minority's share, which the consolidation report adds for its 100% column). Kinds: matched (the matched amount at the share both sides hold), nci (the extra share the group holds of one side goes to the group's declared NCI account, or the NCI placeholder; decision 12), difference (each side's residual to the group's ic_difference_account, labelled with the cause; decision 13), and unrealized_profit (epm_staging.ic_elimination_rules × epm_staging.ic_balances: ending_inventory_from_ic × margin_pct, raised in every group that holds the buyer). Balance pairs post the change since the previous row, so a timing difference reverses when the partner catches up. Legs below materiality_floor() are dropped. Rows with no partner are never eliminated (see gold_ic_unmatched).

Columns: rule_id, rule_name, rule_type, consolidation_group, fiscal_year, fiscal_period, debit_account, credit_account, debit_entity, credit_entity, elimination_amount, debit_elimination, credit_elimination, elimination_kind, difference_cause, basis, elimination_view, entity_a, account_a, entity_b, account_b.

Tests: assert_ic_elimination_nets_zero, assert_ic_elimination_within_balance, assert_ic_full_view_nets_zero, assert_ic_nci_line_nets_zero, assert_ic_nci_leg_entity, assert_ic_nci_account_declared (warn), assert_unrealized_profit_elimination, assert_equity_method_no_ic_elim.

gold_ic_unmatched​

Intercompany balances with no partner (decision 2: the partner is optional and nothing guesses it): gold_consolidated_trial_balance rows on a flagged account with partner_data_area_id = '', summed per group, period, entity and account, kept when |group_amount| ≥ materiality_floor(). Today that is every D365 ledger line on an intercompany account.

Columns: consolidation_group, fiscal_year, fiscal_period, data_area_id, main_account, counterpart_account, unmatched_local_amount, unmatched_amount, reason (no partner).

gold_equity_method_associates​

Equity method (PRD-14): one two-line journal per associate per period. An associate is an entity gold_entity_ownership resolves with consolidation_method = 'equity' and a complete chain. The journal is emitted once per ancestor group, when the translated share is above 0.01 in group currency (abs(equity_income_amount) > 0.01 in the model's equity_entries CTE); a share that rounds to nothing posts no journal.

  • Share of the result: net_income × effective_ownership_pct. net_income is debit minus credit over is_pnl = 1 accounts (gold_trial_balance × silver_main_accounts), so a profit is negative.
  • Translation: from the associate's accounting currency (silver_entity_currencies) into the group's reporting currency, at the period's governed Average rate (epm_staging.group_exchange_rates, konsolidat#93). A same-currency associate uses 1.0. A Closing period reads its year's last Regular period's rate (rate_period_map(), konsolidat#199).
  • Refusals: a missing, duplicated or invalid Average rate stops the build (throwIf), as in gold_consolidated_trial_balance. assert_equity_associate_has_average_rate names every such key (konsolidat#279). A group with no root row, so no reporting currency, is refused first, by name.
  • Balanced: EQ_INVEST carries the negation of EQ_INCOME, so each journal sums to 0 (konsolidat#279, PR #281; before, both lines carried the same signed figure). Layer 5 of gold_fully_consolidated_tb.
ColumnTypeDescription
consolidation_groupStringGroup identifier; the entry is emitted once per ancestor group (not_null)
data_area_idStringThe associate
fiscal_yearUInt16Fiscal year
fiscal_periodUInt16Fiscal period
main_accountStringEQ_INCOME (share of profit) or EQ_INVEST (investment movement): reserved pseudo-accounts, not in the chart
account_nameStringEquity method - share of profit / Equity method - investment
reporting_currencyStringThe group's reporting currency, which amount is in
amountFloat64Signed, debit positive. EQ_INCOME = translated share of the result (a profit is a credit, negative); EQ_INVEST = its negation
adjustment_typeStringequity_method
journal_idStringEQ_<group>_<entity>_<year>_P<period>

Grain: two rows per group × associate × year × period. Tests: assert_equity_method_journal_balances (each journal sums to 0), assert_equity_income_formula (the EQ_INCOME line equals the translated formula), assert_equity_associate_has_average_rate (every associate period the model would refuse, by key and reason, from the model's inputs), assert_equity_method_single_line, assert_equity_method_no_ic_elim.

gold_nci_movement_schedule​

Non-controlling interest per period (PRD-13) for fully consolidated entities with effective_ownership_pct < 1 (gold_entity_ownership, method full): share_of_profit = Σ nci_amount over P&L accounts of gold_consolidated_trial_balance, nci_closing_balance = Σ nci_amount over balance-sheet accounts, nci_pct = 1 − effective_ownership_pct. Entity names come from epm_gold.consolidation_groups keyed on data_area_id alone (an entity is a node exactly once).

Grain: group × entity × year × period. Tests: assert_nci_movement_reconciles.

gold_consolidation_adjustments​

Top-side journals from konsol's Consolidation Journal doctype, epm_staging.consolidation_adjustments, status in ('Approved', 'Reversed'), net_amount = debit − credit. For each Approved journal that names a reversal period (reverse_fiscal_year > 0, konsol#305-D2-11) and has no reversal_journal_id, one auto_reversal row per line in exactly that period with debit and credit swapped, the same journal_id, posted_by = 'system'. The former CSV half (ref('consolidation_adjustments')) is gone (konsolidat#146).

Columns: consolidation_group, adjustment_type (topside, reclassification, auto_reversal, ...), journal_id, data_area_id, fiscal_year, fiscal_period, main_account, debit_amount, credit_amount, net_amount, description, posted_by, status, approved_by, reversal_journal_id, reverse_fiscal_year, reverse_fiscal_period.

Tests: assert_topside_journal_balanced, assert_auto_reversal_generated, assert_auto_reversal_negates_original, assert_auto_reversal_period_declared, assert_reversal_nets_to_zero, assert_adjustment_type_populated.

gold_acquisition_adjustments​

P&L proration only (PRD-11): for epm_staging.ownership_periods rows with an acquisition_date, the P&L rows of gold_consolidated_trial_balance in the acquisition year are prorated to post-acquisition days (prorate_period_amount()), and the pre-acquisition part is emitted as a negative pnl_proration adjustment when > 0.01. The goodwill and fair-value lines this model used to post to hardcoded accounts 1800/1900 are gone (konsolidat#198): gold_business_combination_journal posts them.

Columns: consolidation_group, data_area_id, fiscal_year, fiscal_period, main_account, account_name, adjustment_type, adjustment_amount, acquisition_date. Tests: assert_proration_pre_acquisition_excluded, assert_post_disposal_excluded.

gold_business_combination_journal​

The balanced acquisition journal per submitted Business Combination (epm_staging.business_combinations and its child tables), journal_id = ACQ-<group>-<entity>-<acquisition_date>, in group currency, posted once in the period of epm_staging.fiscal_periods whose start_date ≤ acquisition_date ≤ end_date. The accounts and policy come from the group's root row in epm_gold.consolidation_groups; a deal whose group has no root row, or whose date is outside the declared calendar, posts nothing (assert_acquisition_accounts_declared names it). Lines, by account_role: opening_balance (the entity's pre-acquisition balance sheet at the acquisition period's Closing rate, when it has history; residual to the retained-earnings account), equity_eliminated (−book amount of each acquired equity account), fva, goodwill (consideration + capitalised costs + NCI − (net assets + FVA), when positive) or bargain_gain (per the bargain_purchase policy; Refuse posts nothing and assert_bargain_purchase_refused stops the build), investment, nci (per the deal's nci_measurement, partial or full), costs and their settlement (proceeds). Design: Business Combinations.

Columns: consolidation_group, data_area_id, fiscal_year, fiscal_period, main_account, account_name, adjustment_type (acquisition), adjustment_amount (debit positive), acquisition_date, journal_id, line_no, account_role, deal, measurement_basis (acquired_balances, header_net_assets, measured_from_tb).

Tests: assert_acquisition_journal_balances, assert_acquisition_accounts_declared, assert_acquired_balances_complete (warn), assert_acquisition_measured_in_period (warn), assert_deal_goodwill_matches_header, assert_deal_rate_resolved, assert_goodwill_calculated, assert_bargain_purchase_refused, assert_journal_grain_unique.

gold_goodwill_amortisation_journal​

Straight-line goodwill amortisation when the group root declares goodwill_treatment = 'Amortise' with goodwill_amortisation_years > 0; empty otherwise. For each deal whose acquisition journal booked goodwill: two lines (amortisation_expense Dr, goodwill Cr) in every Regular period from the acquisition period, goodwill / (years × Regular periods in the acquisition year), each instalment the rounded cumulative share minus the previous so they sum exactly. The schedule stops when fully amortised, at the period before a submitted Business Disposal's period, or at the end of the declared calendar. journal_id = GWA-<group>-<entity>-<acquisition_date>.

Columns: as the acquisition journal plus instalment, n_instalments; adjustment_type = 'goodwill_amortisation'. Test: assert_goodwill_amortisation_journal_balances.

gold_business_disposal_journal​

The balanced disposal journal per submitted Business Disposal (epm_staging.business_disposals and its proceeds lines), full disposals only (retained_interest_pct = 0), journal_id = DSP-<group>-<entity>-<disposal_date>, posted once in the disposal period. Lines by account_role: derecognised (every non-equity balance-sheet account at −(cumulative balance) from gold_trial_balance, translated at the disposal period's Closing rate), goodwill (the acquisition journal's goodwill net of amortisation posted before the disposal period), fva, cta (−the entity's accumulated CTA from gold_fx_revaluation: IAS 21.48 recycling), nci, proceeds (each proceeds line at the Closing rate, or the header total), and gain_loss (−Σ of every other line, on disposal_gain_loss_account). The one-sided gold_disposal_adjustments model this replaced (pseudo-account DISPOSAL) was removed in konsolidat#198.

Columns: consolidation_group, data_area_id, fiscal_year, fiscal_period, main_account, account_name, adjustment_type (disposal), adjustment_amount, disposal_date, journal_id, line_no, account_role, deal.

Tests: assert_disposal_journal_balances, assert_disposal_accounts_declared, assert_disposal_has_balances (warn), assert_disposal_gain_loss_exists, assert_cta_recycled_on_disposal.

gold_fully_consolidated_tb​

The consolidated trial balance as one signed table: UNION ALL of six layers, each tagged by adjustment_type. A table rebuilt and swapped every run (no scope filter of its own; its select is always full).

Layeradjustment_typeSourceNote
1 Entityentitygold_consolidated_trial_balance.group_amountsummed over partners to the account grain
2 IC eliminationsic_elimination, ic_elimination_ncigold_ic_eliminations, elimination_view = 'group'one row per leg; the NCI leg carries the partly owned entity
3 CTActagold_fx_revaluationaccount CTA
4 Topsidetopside, reclassification, auto_reversalgold_consolidation_adjustmentssummed to the account grain (konsol#305 V03)
5 Equity methodequity_methodgold_equity_method_associates
6 Acquisition / disposalpnl_proration, acquisition, goodwill_amortisation, disposalgold_acquisition_adjustments and the three deal journalseach summed to the account grain, any(journal_id)

Columns: consolidation_group, data_area_id, fiscal_year, fiscal_period, main_account, account_name, dim_* (empty on non-entity layers), reporting_currency, amount, adjustment_type, journal_id.

Tests: assert_fctb_entity_layer_ties, assert_all_layers_present (error; option #238-4, Deepak Pai, 6 Oct 2026: a layer appears for a group exactly when its source has rows), assert_end_to_end_bs_balances, assert_journal_grain_unique, assert_waterfall_reconciles.

gold_consolidated_ytd​

Running sum of amount over gold_fully_consolidated_tb, partitioned by group, entity, year, account, adjustment_type and dimensions, ordered by period: ytd_amount.

gold_consolidated_fact​

A view for the add-in: gold_fully_consolidated_tb summed per group, year, period and account, with consolidation_group renamed to data_area_id so the API's query builder can filter it like an entity; measure consolidated_amount. Registered as Dataset consolidated: =K.EPM("GROUP_CORP", 2024, 6, "510500", "consolidated_amount", "consolidated").

gold_consolidated_cash_flow​

Group cash-flow statement (indirect method) built after translation from gold_fully_consolidated_tb, fiscal_period > 0. Same construction as gold_cash_flow_indirect: every non-cash amount contributes -amount; cf_category / cf_line_item from epm_staging.cash_flow_categories (Published), else P&L accounts (via silver_main_accounts.is_pnl) to Net Income (Consolidated) and everything else to Consolidation and Non-Cash Adjustments. A balance-sheet pair's ic_elimination_nci entry is left out (a presentation of ownership, not a movement; it nets to zero).

Grain: group × year × period × cf_category × cf_line_item. Tests: assert_consolidated_cf_reconciles, assert_cf_net_income_equals_group_pnl.

gold_cashflow_fact​

A view: gold_consolidated_cash_flow with consolidation_group as data_area_id and cf_line_item as main_account, measure cash_flow_amount. Registered as Dataset cashflow; =K.CF() wraps it.

gold_consolidation_journal​

Audit trail of every consolidation entry (PRD-22): the topside, reclassification and auto-reversal rows straight from gold_consolidation_adjustments (one row per journal line, so two journals on one account are never collapsed; konsol#305 V05), plus every other non-entity layer of gold_fully_consolidated_tb, split into debit_amount / credit_amount by sign.

Columns: consolidation_group, data_area_id, fiscal_year, fiscal_period, main_account, account_name, adjustment_type, journal_id, reporting_currency, debit_amount, credit_amount, net_amount, entry_source. Test: assert_consolidation_journal_names_every_journal.

gold_consolidation_waterfall​

One row per group × year × period: the layers of gold_fully_consolidated_tb summed and pivoted into cumulative checkpoints entity_amount → after_ic_elim → after_cta → after_topside → after_equity_method → final_amount, plus each layer's own total (ic_elimination_amount, cta_amount, topside_amount, equity_method_amount, acq_disposal_amount). Test: assert_waterfall_reconciles.

Reporting hierarchies (domain:reporting)​

gold_reporting_hierarchy​

Published rows of epm_staging.reporting_hierarchies (konsol's Reporting Hierarchy doctype): one row per member tranche (konsolidat#220: a renamed, moved or ended node is a second row of the same member_code with its own member_effective_from / member_effective_to window). Columns: hierarchy_name, dimension, member_code, member_label, parent_member_code, is_group, hierarchy_level, path, effective_from, effective_to, is_default, member_effective_from, member_effective_to. Cluster-aware.

gold_reporting_hierarchy_closure​

Ancestor–descendant bridge over gold_reporting_hierarchy, built with a recursive CTE (depth < 20). Each closure row holds within a window (valid_from, valid_to): the intersection of the descendant tranche's window and each parent tranche's, so a reader picks the row covering the date it asks about. Columns: hierarchy_name, dimension, descendant_member_code, ancestor_member_code, ancestor_level, ancestor_is_group, ancestor_label, valid_from, valid_to. Tests: assert_hierarchy_closure_windows, assert_hierarchy_no_circular_ref, assert_hierarchy_all_entities_resolved.

gold_tb_at_hierarchy_node​

gold_trial_balance rolled up to every node of every published hierarchy. The trial balance is unpivoted one row per declared dimension (tb_dimension_long_sql()), dated to its period's end_date from epm_staging.fiscal_periods (last day of the month when the calendar does not list it), joined to the leaf tranche and the closure rows whose windows cover that date, and summed with hierarchy_measure_sums(). The dimension being rolled up is blanked in the output. Columns: hierarchy_name, hierarchy_dimension, hierarchy_member_code, hierarchy_member_label, hierarchy_level, hierarchy_is_group, the trial-balance keys, dim_*, the measures. Tests: assert_hierarchy_rollup_ties, assert_hierarchy_node_as_of, assert_hierarchy_node_columns.

gold_budget_at_hierarchy_node​

The same roll-up over gold_spread_budget (budget dimensions only, budget_dimension_long_sql()), keeping scenario_id and the budget layer so a read can filter to one layer; summing all layers is the final budget. Measures period_amount, annual_amount. Test: assert_budget_fact_grain_unique.

gold_variance_at_hierarchy_node​

The same roll-up over gold_variance_analysis (variance_dimension_long_sql()), per budget_scenario_id (konsolidat#206: actuals are never counted once per budget scenario), measures actual_amount, budget_amount, variance_abs (variance_measure_sums()). Test: assert_variance_node_single_budget.

gold_unassigned_hierarchy_members​

Data-quality queue: GL dimension values (from gold_trial_balance, unpivoted) that no leaf tranche of the default published hierarchy for that dimension covers at the period's end_date. A value that becomes a leaf in 2025 is unassigned in 2024 and assigned from 2025. Columns: hierarchy_dimension, default_hierarchy_name, dimension_member_code, fiscal_year, fiscal_period. Test: assert_unassigned_as_of.

Scenarios and variance (domain:scenarios)​

gold_scenario_trial_balance​

One table of actual and budget amounts by scenario, three branches: gold_trial_balance stamped with the site's single active scenario_type = 'actual' scenario from epm_gold.scenario_definitions (ACTUAL when none or several; assert_scenario_rows_declared names it), data_source = 'gl'; silver_budget_entries as BUDGET, data_source = 'd365_budget'; and gold_spread_budget summed over layers per scenario, data_source = 'budget'. Budget dimensions only.

Columns: scenario_id, data_area_id, fiscal_year, fiscal_period, main_account, account_name, account_type_name, budget dim_*, amount, data_source.

gold_variance_analysis​

Actual vs budget per period (PRD-7). Which scenario is the actual and which are budgets is declared in konsol's Scenario doctype (scenario_type, active only; konsolidat#206). Every active budget scenario gets its own rows, keyed by budget_scenario_id; an actual (entity, year) no budget covers comes out once with budget_scenario_id = '' and budget_amount null. variance_abs = actual − coalesce(budget, 0), variance_pct null when the budget is 0 or missing, variance_favorable true for Revenue when actual > budget and for Expense when actual < budget (silver_main_accounts types); the generic Profit and loss type has no favourable direction.

Columns: data_area_id, fiscal_year, fiscal_period, main_account, account_name, account_type_name, is_pnl, budget dim_*, actual_amount, budget_amount, variance_abs, variance_pct, variance_favorable, budget_scenario_id.

Tests: assert_variance_abs_formula, assert_favorable_revenue, assert_favorable_expense, assert_variance_covers_budget_scenarios, assert_variance_budget_matches_year.

gold_variance_quarterly​

The same pairing with gold_period_hierarchy.fiscal_quarter as the time key: actual_amount, budget_amount, variance_abs, variance_pct, budget_scenario_id.

gold_variance_ytd​

The same pairing per period, then running totals within (entity, year, account, budget dimensions, budget_scenario_id): ytd_actual, ytd_budget (null when no budget line to date), ytd_variance_abs, ytd_variance_pct.

Reference and staging-derived (domain:staging)​

gold_spread_budget​

The canonical monthly budget fact (PRD-6, konsolidat#94), one row per scenario × entity × year × period × account × budget dimensions × layer: (a) epm_gold.budget_annual_input spread over the periods of its spread_profile_id using epm_gold.spread_profiles weights normalised to sum to 1 (layer = 'base'); (b) epm_gold.budget_monthly_input (Budget Sheet, all layers base / challenge / management / board) as an identity spread, spread_profile_id = 'manual'. A manual base row displaces the annual spread for the same grain; other layers are additive.

Columns: scenario_id, data_area_id, fiscal_year, fiscal_period, main_account, budget dim_*, layer, annual_amount, spread_profile_id, profile_name, period_weight, period_amount, submitted_by. Tests: assert_spread_sums_to_annual, assert_spread_has_12_periods, assert_budget_fact_grain_unique.

gold_scenario_versions​

Scenario metadata: epm_gold.scenario_definitions (konsol's Scenario doctype, source = 'konsol') unioned with epm_staging.scenario_definitions rows created through the API whose ids the doctype does not hold (source = 'api'). Columns: scenario_id, scenario_name, scenario_type, is_active, source.

gold_consolidation_hierarchy​

Structure only (F2): epm_staging.consolidation_hierarchy rows with a group and entity: consolidation_group, data_area_id, parent_group, hierarchy_level, path. Carries no ownership (that is gold_entity_ownership), and the former fallback to a seed is gone; an empty staging table yields nothing and assert_staging_not_stale names it. scope_filter() resolves a group code to its descendants through path. Test: assert_scope_resolves_to_entities. (assert_consolidation_group_root_unique guards the group root rows in epm_gold.consolidation_groups that the deal journals read.)

gold_period_hierarchy​

One row per fiscal period built from the vars fiscal_quarter_mapping, fiscal_half_mapping and fiscal_extra_periods (periods 0 OPN and 13 CLS on the demo): fiscal_period, period_label (P01..P12 or the extra period's label), fiscal_quarter, fiscal_half.

gold_unmapped_dimension_values​

Data-quality queue: distinct (erp_source, entity_id, dimension, source_value) in stg_gl_entries that no Published row of epm_staging.dimension_mappings covers, either as an ERP-wide default (entity = '') or for that entity (konsol#111). Drives the Dimension Mapping review. With no ERP in erp_sources the queue is empty.

Removed models​

  • The two cost-allocation models (allocation results and the allocation audit trail) and the allocation macros: cost allocation removed (konsol#264; konsolidat de468fa, 2026-09-19).
  • gold_disposal_adjustments: replaced by gold_business_disposal_journal (konsolidat#198, 51e3c2a). A working-tree edit to dbt_project.yml in the product repo still names it in the domain:consolidation block; the model file does not exist on main.