All posts · BI Reports

BI Publisher Data Models: Design and Best Practices

The data model is the foundation of every BIP report — here's how to design efficient, flexible data models with parameters, joins, and complex data structures.

Anurag Jangra · January 27, 2026 · 6 min read · ... views

Data model components

A BI Publisher data model is an XML artifact stored in the BIP catalog. It contains:

  • Data sets: SQL queries, REST calls, or Oracle BI subject area connections
  • Parameters: runtime inputs that filter or control the report
  • List of Values (LOV): parameter value lists (dropdowns)
  • Bind links: parent-child relationships between datasets
  • Aggregates: calculated totals and subtotals

SQL dataset best practices

The data model SQL should be read-only, parameterised, and efficient:

-- Good: parameterised, filtered, aliased
SELECT
  po.po_number,
  po.creation_date,
  s.supplier_name,
  SUM(pol.amount) AS total_amount
FROM po_headers po
JOIN po_lines pol ON po.po_id = pol.po_id
JOIN suppliers s ON po.supplier_id = s.supplier_id
WHERE po.status = :P_STATUS
  AND po.org_id = :P_ORG_ID
  AND po.creation_date BETWEEN :P_FROM_DATE AND :P_TO_DATE
GROUP BY po.po_number, po.creation_date, s.supplier_name
ORDER BY po.creation_date DESC

Parameter types

  • Menu: user selects from a pre-defined list
  • Text: free-text input
  • Date: date picker
  • Hidden: default values not shown to user (useful for org_id from session variables)

Define default values and mark parameters as required or optional.

For master-detail reports (PO header with lines), use two datasets linked by key:

  • Dataset 1 (G_PO): PO header query, key = PO_ID
  • Dataset 2 (G_LINES): PO lines query filtered by PO_ID = :PO_ID
  • Bind link: G_PO.PO_ID → G_LINES.PO_ID (parent-child)

BIP executes the child query once per parent row, building nested XML. The template then iterates parent rows and their children.

Using session variables

Access Fusion session context in data model SQL:

WHERE gl.ledger_id IN (
  SELECT ledger_id FROM gl_access_set_ledgers
  WHERE access_set_id = :xdo_user_id  -- current user's access set
)

Testing and generating sample data

Always generate sample XML before creating templates: Data Model → View Data → run → export XML. This sample is used by Template Builder for Word during template design — without it, you’re designing blind.

Think Beyond the Implementation

Questions worth sitting with after reading this

01

Why is this architecture appropriate for this specific context — and where would it be the wrong choice?

02

What assumptions did we make that aren't stated explicitly? What happens if those assumptions are wrong?

03

What would break first if the requirements changed — volume doubled, a third system was added, or the deadline halved?

04

What alternatives did we reject, and why? Was the decision made on evidence — or habit?

AJ
Anurag Jangra
Oracle Cloud PaaS Consultant · OIC & VBCS Specialist

4.5+ years delivering enterprise Oracle Cloud integrations and VBCS applications across manufacturing, IT services, and financial sectors. OCI Certified — writes about real-world OIC, VBCS, SQL, and BI Publisher patterns from production experience.

Chat on WhatsApp