Accessing tables using Tabular SQL

When the required schema elements (tables or columns) for a report are not present in the metadata model, Tabular SQL can be used to access the elements. Tabular SQL is a method by which report authors can by bypass the metadata model and write SQL statements directly against the database. Report authors can also define query subjects at the metadata level so these query subjects can be used across reports, for example:

SELECT
AUDIT_LOG.AUDLOG_ID,
AUDIT_LOG.AUDLOG_ACTION,
AUDIT_LOG.WBU_NAME,
AUDIT_LOG.AUDLOG_CHANGE_DATE,
AUDIT_LOG.AUDLOG_KEY_ID,
AUDIT_LOG.AUDLOG_TABLENAME,
AUDIT_LOG.AUDLOG_FIELDNAME,
AUDIT_LOG.AUDLOG_OLD_VALUE,
AUDIT_LOG.AUDLOG_NEW_VALUE,
AUDIT_LOG.WBU_NAME_ACTUAL,
AUDIT_LOG.CLIENT_ID
FROM
[workbrain].#$ToggleSchema{$account.parameters.ARCHIVE_VIEW_MODE}#.AUDIT_L
OG as AUDIT_LOG

Setting up an alias for the table name as described in the above example is important when specifying a query subject definition in the metadata model. The archived table names exist in both the archive and production schemas. If you do not use aliasing, then resolution errors occur in Cognos on the database platforms.

Note:  We do not recommend extending the core metadata model to include additional objects. Extending the metadata model is considered a customization and is not supported for future fix packs and upgrades.