Including Comments in Queries
When you need to track and analyze queries, you can include dedicated comments in the inbound queries.
To configure AtScale to propagate these comments to the outbound queries, enable the following global settings:
query.includeComments.general.enabled: Whether to include comments in the outbound query from system-generated queries. The default value istrue.query.includeComments.general.userComments: Whether to include user comments in the outbound query from inbound queries. The default value istrue.query.includeComments.general.queryId: Whether to include the query ID in the outbound query from system-generated queries. The default value isfalse.query.includeComments.general.userId: Whether to include the user ID in the outbound query from system-generated queries. The default value isfalse.
For more information on these settings, see Query Settings.
SQL language queries
For SQL language queries, the comments must be located in the body of the query, right after the SELECT keyword. They should be wrapped like this:
/* user_comment(`comments here`) */
For example:
SELECT /* user_comment(`comments here`) */
CAST('Can you see the comment?' AS BOOLEAN)
FROM
asadventuresmall
LIMIT
1
MDX language queries
For MDX language queries, comments must be located in the body of the query, in the PropertyList > UserComments tag. For example:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
<Command>
<Statement>
(statement ...)
</Statement>
</Command>
<Properties>
<PropertyList>
<UserComments>Here are some user comments</UserComments>
<Catalog>EngineDemo</Catalog>
(other tags ...)
</PropertyList>
</Properties>
</Execute>
</soap:Body>
</soap:Envelope>