Teradata V13 and Comments

Database
Teradata Employee

Teradata V13 and Comments

Hello!

We have a process whereby user queries require "approving" or "rejecting" when accessing sensitive customer data. In order to make the process run more smoothly we ask that users comment their queries to pass a note for the reviewer:

SELECT Top 100 * /* Project Projectname Analysis Q1 */
FROM databasename.tablename
;

What we are finding with ODBC connectivity is that the comments are stripped out before reaching Teradata. If we set the option Disable Parsing in the ODBC options, the comments remain in the query and this is the workaround we are following.

My question is does anyone know any other settings/causes of comments being stripped from queries? Also, with Teradata.Net connectivity, is there anything to check to ensure the comments make it to Teradata?

Thanks!!!
2 REPLIES
Enthusiast

Re: Teradata V13 and Comments

Have you considered using Query Bands for this? The data in the query band will be retained in DBQL and can be submitted per transaction.

SET QUERY_BAND ='proj=ProjectName;report=Q1Analysis;' FOR TRANSACTION;

SELECT TOP 100 *
FROM DatabaseName.TableName
;
Teradata Employee

Re: Teradata V13 and Comments

Rob,

Thanks for your reply. I am not aware of query bands, but have heard the phrase "query banding". I'll feed this to our DBAs, as this could possibly be a good way forward. I'll also have a look at the documentation for Query Bands.

Thanks!

Andrew