<table>

Abstract

Learn to configure the <table> element for Pull Reports™ Ad Hoc report and data service software.


Catalog Configuration Java API analog:  TableConfigurationBuilder

A <table> element represents one relational database table within the report configuration. Every <report> has exactly one <table> or <table_ref> direct child called the base table which is always included in Export Report REST API SQL joins and export results. Nest additional <table>s within child <relationship> elements of the base table to extend the report's join tree.

A <table> must map to one TABLE (or VIEW or MATERIALIZED VIEW) in the underlying relational database via the name attribute or contain a child <subquery> element which defines the <table>'s subquery.

Global tables: A global <table> is configured as a direct child of a <catalog>. Global tables allow one <table> configuration to be used multiple times within a <catalog>. Global <table>s are referenced via <table_ref>s. For an example of global table usage see the section called “Catalog with multiple <report>s using <table_ref>.

Usage

See the <report> and <relationship> documentation for example usage.

Children

<description>?
<subquery>?
(<column> | <column_group_ref>)+
<pre_filter>*
<relationship>*

Parents

<catalog>
<relationship>
<report>

Attributes

id

Specifies the id of the <table> within table resource path statements.

If the <table> is a global table, the id must be unique within the parent <catalog>.

Additionally, all <table>s and <table_ref>s nested within <relationship>s with the same <table> join parent must have unique id values between themselves. This requirement ensures that each table resource path uniquely identifies one <table> or <table_ref> within a <report>.

displayName

The human-readable table name.

name (Optional)

The name of the table or view in the database. This name may be dot (.) preceded with a schema name. For instance, schema_name.table_name.

The name attribute is required unless the <table> has a child <subquery> element. The name attribute is also required if the <table> has a child a <subquery> with a provider attribute and the referenced SubqueryProvider returns a Subquery which in turn returns the empty Optional from the getValue method.

primaryKeyColumns (Optional)

A comma separated list of <column> ids which are the table's primary keys.

This attribute is required for each table with at least one descendant <relationship> of cardinality many in order for the <report> to support the jsontree and htmltree export formats.

The column ids referenced by primaryKeyColumns may not contain <output_transform>s because the column values are used in jsontree and htmltree exports to filter tree results.

See the <relationship> documentation for example usage.