offdataai
Public Sector & Nonprofit · data model template

Government Tax & Revenue EDW data model

Data Vault 2.0 raw vault for tax & revenue: hubs (taxpayer/tax_account/tax_return/payment/jurisdiction), links (taxpayer-account, account-return, account-jurisdiction, return-payment), and satellites (taxpayer, account, return, payment details + account-status effectivity + assessment). Hash keys and load metadata are generated by the DDL layer.

Government tax and revenue enterprise data warehouse modeled as a Data Vault 2.0 raw vault: taxpayer, tax account, tax return, payment, and jurisdiction hubs; ownership, filing, and jurisdiction links plus a non-historized return-payment link; and descriptive, assessment, and effectivity satellites — built for integrating registration, filing, collections, and payment systems with the full historization and audit lineage (GDPR, SOX) a revenue authority must retain. It is a Data Vault 2.0 raw vault: hubs for business keys, links for relationships and satellites for descriptive history, with hash keys and hash diffs generated in the DDL.

Data Vault 2.0Public Sector & NonprofitGDPRSOXPII
16
tables
102
columns
14
relationships
7
PII columns

Opening the template creates a project with the ERD, platform-native DDL, a dbt project and documentation already generated (recommended platform: PostgreSQL). Edit it in plain English or on the canvas, then ship it to any supported warehouse.

Subject areas

hubslinkssatellitesreference

Design decisions

  • Hubs hold only business keys

    Isolating immutable identifiers (taxpayer_id, tax_account_number, return_id) into hubs lets new collection and audit source systems attach without reworking existing structures — the core agility of Data Vault for an agency integrating decades of legacy systems.

  • Non-historized return-payment link

    Payments are immutable financial events, so the return-payment link is insert-only and carries its measures directly — no satellite needed.

  • Effectivity satellite for account collection status

    A tax account moves between active, delinquent, installment-plan, and lien states; an effectivity satellite records the valid period of each status for as-of and statute-of-limitations reporting.

  • Assessment split into its own satellite

    Audit and penalty determinations arrive on a different cadence and from different units than the filed return; a dedicated assessment satellite keeps audit history queryable and the return satellite stable.

  • Auditability and GDPR drive Data Vault for tax

    Load_date + record_source on every row give a queryable audit trail for SOX controls, while national_id full-masking and per-attribute classification satisfy GDPR data-minimisation on taxpayer PII.

Tables in the Government Tax & Revenue EDW model

Every table with its grain, columns, types and keys. PK marks a primary key, BK a business key and PII a column classified as personal data, which gets a masking strategy by default.

Hubs (5)

hub_taxpayer

Grain: one row per unique hub_taxpayer business key

ColumnTypeKeys
taxpayer_idvarcharBK
load_datetimestamp
record_sourcevarchar

hub_tax_account

Grain: one row per unique hub_tax_account business key

ColumnTypeKeys
tax_account_numbervarcharBK
load_datetimestamp
record_sourcevarchar

hub_tax_return

Grain: one row per unique hub_tax_return business key

ColumnTypeKeys
return_idvarcharBK
load_datetimestamp
record_sourcevarchar

hub_payment

Grain: one row per unique hub_payment business key

ColumnTypeKeys
payment_idvarcharBK
load_datetimestamp
record_sourcevarchar

hub_jurisdiction

Grain: one row per unique hub_jurisdiction business key

ColumnTypeKeys
jurisdiction_codevarcharBK
load_datetimestamp
record_sourcevarchar

Links (4)

lnk_taxpayer_account

Grain: one row per lnk_taxpayer_account relationship

Which taxpayer owns which tax account.

ColumnTypeKeys
taxpayer_hkbinary
tax_account_hkbinary
load_datetimestamp
record_sourcevarchar

lnk_account_return

Grain: one row per lnk_account_return relationship

Which tax account a return was filed against.

ColumnTypeKeys
tax_account_hkbinary
tax_return_hkbinary
load_datetimestamp
record_sourcevarchar

lnk_account_jurisdiction

Grain: one row per lnk_account_jurisdiction relationship

Which jurisdiction administers a tax account.

ColumnTypeKeys
tax_account_hkbinary
jurisdiction_hkbinary
load_datetimestamp
record_sourcevarchar

lnk_return_payment

Grain: one row per posted payment against a return (non-historized link)

Transactional (non-historized) link — insert-only payment events.

ColumnTypeKeys
tax_return_hkbinary
payment_hkbinary
payment_event_idvarcharBK
payment_tstimestamp
payment_methodvarchar
payment_statusvarchar
amountdecimal
currencyvarchar
load_datetimestamp
record_sourcevarchar

Satellites (6)

sat_taxpayer_details

Grain: one row per taxpayer_hk per change

Taxpayer descriptive history (PII).

ColumnTypeKeys
taxpayer_hkbinaryPK
load_datetimestampPK
first_namevarcharPII
last_namevarcharPII
date_of_birthdatePII
national_idvarcharPII
emailvarcharPII
phonevarcharPII
mailing_addressvarcharPII
taxpayer_typevarchar
filing_statusvarchar
load_end_datetimestamp
record_sourcevarchar

sat_account_details

Grain: one row per tax_account_hk per change

Tax account descriptive history.

ColumnTypeKeys
tax_account_hkbinaryPK
load_datetimestampPK
tax_typevarchar
account_statusvarchar
open_datedate
fiscal_year_enddate
outstanding_balancedecimal
load_end_datetimestamp
record_sourcevarchar

sat_return_details

Grain: one row per tax_return_hk per change

Tax return descriptive history.

ColumnTypeKeys
tax_return_hkbinaryPK
load_datetimestampPK
tax_periodvarchar
filing_datedate
filing_channelvarchar
gross_incomedecimal
taxable_incomedecimal
tax_duedecimal
credits_claimeddecimal
return_statusvarchar
load_end_datetimestamp
record_sourcevarchar

sat_payment_details

Grain: one row per payment_hk per change

Payment descriptive history.

ColumnTypeKeys
payment_hkbinaryPK
load_datetimestampPK
payment_channelvarchar
confirmation_numbervarchar
processing_feedecimal
reversal_reasonvarchar
load_end_datetimestamp
record_sourcevarchar

sat_account_status

Grain: one row per account status per effectivity change

Effectivity satellite tracking tax-account collection status over time.

ColumnTypeKeys
tax_account_hkbinaryPK
load_datetimestampPK
status_codevarchar
effective_fromdate
effective_todate
is_activeboolean
status_reasonvarchar
load_end_datetimestamp
record_sourcevarchar

sat_assessment

Grain: one row per tax_return_hk per change

Assessment satellite — audit and penalty determinations on a return.

ColumnTypeKeys
tax_return_hkbinaryPK
load_datetimestampPK
assessment_typevarchar
assessed_amountdecimal
penalty_amountdecimal
interest_amountdecimal
assessment_datedate
assessor_unitvarchar
assessment_statusvarchar
load_end_datetimestamp
record_sourcevarchar

Lookup tables (1)

ref_currency

Grain: one row per ISO currency

ColumnTypeKeys
currency_codevarcharBK
currency_namevarchar
minor_unitssmallint

Relationships

Each relationship is a foreign key on the first table referencing the second.

  • lnk_taxpayer_account.taxpayer_hk → hub_taxpayer (many-to-one)
  • lnk_taxpayer_account.tax_account_hk → hub_tax_account (many-to-one)
  • lnk_account_return.tax_account_hk → hub_tax_account (many-to-one)
  • lnk_account_return.tax_return_hk → hub_tax_return (many-to-one)
  • lnk_account_jurisdiction.tax_account_hk → hub_tax_account (many-to-one)
  • lnk_account_jurisdiction.jurisdiction_hk → hub_jurisdiction (many-to-one)
  • lnk_return_payment.tax_return_hk → hub_tax_return (many-to-one)
  • lnk_return_payment.payment_hk → hub_payment (many-to-one)
  • sat_taxpayer_details.taxpayer_hk → hub_taxpayer (many-to-one)
  • sat_account_details.tax_account_hk → hub_tax_account (many-to-one)
  • sat_return_details.tax_return_hk → hub_tax_return (many-to-one)
  • sat_payment_details.payment_hk → hub_payment (many-to-one)
  • sat_account_status.tax_account_hk → hub_tax_account (many-to-one)
  • sat_assessment.tax_return_hk → hub_tax_return (many-to-one)

Related templates

All templates →
Start for $1

From requirements to AI-ready context, in one platform.

Describe your business in a conversation, start from a template or connect your own database. Your first model is ready in minutes.

Get startedBook a demo

Plans from $1/month · cancel any time