Knowledge Center

Knowledge Center > Reporting > Data Sources and Exports > Introduction to Data Sources

Introduction to Data Sources

What is a Zuora Data Source?

In Zuora, your data is contained in different objects, and those objects have different relationships to each other. An Account object contains basic information like the name of the account, its currency, and its payment terms. Each Account may have one or more Subscription objects associated with it. Each Subscription contains information like the term start and end dates and the renewal term. A data source is a way of joining those objects together. 

The Zuora Object Model

The Zuora object model is like a tree. Low level objects (like Invoice Items) link up to high level objects (like Account) through various branches (like Invoice).

invoice_item_datasource.png

When we create a data source, we start with a base object, which is basically a starting point on the tree. Each data source will contain one row for each instance of the base object. If you are in the Account data source and you have 100 Accounts, your Account data source will have 100 rows.

Then we go from that base object to the trunk of the object tree and link it with as many things as we can. It’s important to understand that Zuora only moves from leaves to trunk and not vice versa. In technical terms, when we form a data source, we avoid crossing one-to-many relationships. If we went the other direction, we would no longer have one row for each base object; instead, we would have duplicate base objects, which is something we want to avoid for reporting reasons. We would not, for example, want to double count a key metric.

A Data Source Reporting Example

If we wanted to report on invoices, we could pick the Invoice data source. From the Invoice data source we can link each Invoice to an Account because each Invoice is tied to only one Account.  One drawback of picking the Invoice data source, however, is that if you want more granular details, that is prohibited by the data object model where each base object has only one record, and each invoice can contain multiple invoice items. A selection of the Invoice data source would only allow us to construct the following table:

Account: Account Number

Invoice: Invoice Number

Invoice: Invoice Date

Invoice: Amount

A-00001

INV-00001

1/1/2015

100

A-00001

INV-00002

2/1/2015

100

A-00001

INV-00003

3/1/2015

100

 

On the other hand, if we choose the Invoice Item data source, we can link to Invoice, and, via Invoice, all the way back to Account. Each row in this data source represents one Invoice Item.

Account: Account Number

Invoice: Invoice Number

Invoice: Invoice Date

Invoice: Amount

Invoice Item: Charge Name

Invoice Item: Charge Amount

A-00001

INV-00001

1/1/2015

100

Monthly Platform Charge

80

A-00001

INV-00001

1/1/2015

100

Monthly Support Charge

20

A-00001

INV-00002

2/1/2015

100

Monthly Platform Charge

80

A-00001

INV-00002

2/1/2015

100

Monthly Support Charge

20

A-00001

INV-00003

3/1/2015

100

Monthly Platform Charge

80

A-00001

INV-00003

3/1/2015

100

Monthly Support Charge

20

When Choosing a Data Source

When you want to choose a data source, it’s best to start by asking what object in Zuora contains the field or metric that you want to report on. Choose the data source named after that object.

Data Source Details

Reporting users who can build reports can use the data sources listed in Data Source Availability.

Last modified
18:56, 9 May 2017

Tags

Classifications

(not set)