Welcome to Zuora Product Documentation

Explore our rich library of product information

Reporting objects in Data Query

Learn about Reporting objects in Data Query.

Data Query now supports querying Reporting metadata through dedicated system objects, allowing users to analyze report configurations, execution history, and schedules using SQL.

Available objects

The following are the available objects:

  • Reports

  • ReportRun

  • ReportSchedule

Reports

The Reports object contains metadata about report definitions.

The key fields are:

  • Id – Unique report identifier

  • Name, Number – Report name and internal identifier

  • ReportType – Type/category of report

  • Datasource, DsName – Underlying data source

  • CreatedBy, CreatedOn, UpdatedOn – Audit fields

  • Definition – Report configuration (JSON/string)

  • ExpiredOn, Deleted – Lifecycle status

The use cases are:

  • Inventory all reports

  • Identify unused or expired reports

  • Audit report ownership and definitions

ReportRun

The ReportRun object tracks execution history of reports.

The key fields are:

  • ReportId, ReportName – Link to report

  • StartedOn, CreatedOn – Execution timestamps

  • Status – Run status (Success, Failed, etc.)

  • Delivery, DeliveryStatus – Delivery method and outcome

  • Message – Error or status message

  • ResultsMetadata – Output details

  • JobId – Execution job identifier

The use cases are:

  • Monitor report execution success/failure

  • Analyze run frequency and trends

  • Troubleshoot failed reports

ReportSchedule

The ReportSchedule object contains scheduling and distribution details.

The key fields are:

  • ReportId – Associated report

  • RecurringType, ScheduleType, RunType – Scheduling configuration

  • StartTime, EstimatedEndTime – Execution timing

  • DistributionList – Recipients

  • ResultFormat – Output format (CSV, etc.)

  • NotifyOnlyWhenDataExists – Conditional delivery flag

  • Deleted – Active/inactive schedule

The use cases are:

  • Audit all scheduled reports

  • Review recipients and distribution patterns

  • Analyze scheduling frequency

Data access

You can access these objects via:

  • Data Query UI

  • Data Query API

For example, to identify Report Usage with Run Activity:

SELECT
 r.Name,
 COUNT(rr.Id) AS total_runs,
 MAX(rr.StartedOn) AS last_run
FROM Report r
LEFT JOIN ReportRun rr
 ON r.Id = rr.ReportId
WHERE r.Deleted = false
GROUP BY r.Name
ORDER BY total_runs DESC