<base>
<base>
is the concrete macro operation that represents the action
of opening the initial table.
Description
Queries run by TRS or MLW typically need a <base>
operation to specify
the table upon which subsequent transformations will be carried out. Queries often begin
with <base>
, but it is not required. For example, the
<base>
operation may be hidden in block code or specified as part of a
complex construct such as <loop>
or <dynamic>
.
If you do not specify a <base>
table, the query runs with an implied
<base table="default.lonely">
. This is convenient when building
QuickApps where the base table for the overall query doesn't matter. However, for
straightforward data analysis queries, where you will be using such operations as
<link>
, <willbe>
, and <sel>
,
you need to specify the table you're working with using <base>
.
Syntax
<base label="[NEW_TABLE_TITLE]" table="[BASE_TABLE_PATH]"/>
Attributes
label
- The new title (label) to be displayed with the current worksheet. This replaces the
title of the base table. Note that any tabulation operation will change the title to
"Tabulation" by default; the label attribute may be used in the
<tabu>
element to modify the post-tabulation title. suffix
- Specify a suffix to be appended to the names of all real columns in the base table.
For example, with
suffix="_a"
, the columndate
will be renamed todate_a
. table
- Specify the name or ID of a new base table, which will be used as the base of this macro instead of the current table.
Example
In this example, assume there is no "current" table, and the object is to specify pub.demo.retail.item for use with additional Macro Language code.
<base label="Transaction-level Data" table="pub.demo.retail.item"/> <sel value="store=1"/>