You can translate the question and the replies:

query bands to teradata.

my team is impementing denodo with one of our customer facing apps calling denodo. denodo then will reach out to Teradata. so the jdbc from my app will be calling the denodo views/objects ( which are inherintly mapped to my teradata views/objects). teradata has this notion of a query band, where we can pass contextual information about the ultimate 'caller' to the query is ( a human using our front end app). how can we pass this allong from our app, have denodo midlle layer inject or receive these 'session' context variables and put them in the jdbc call it does to teradata. is it at all possible? or have folks even done this. qeury bands are a requirement for our dbas for triage of issues, should a query go rogue. we have a generic terada non human id from denodo to dev, but that is not the level they need for triage, with a monitor tool they use ( Teradata ViewPoint) let me know thanks.
25-03-2020 12:12:57 -0400

7 Answers

Hi, For your case, you could try to set the QUERY_BAND expression in the Connection Pool of your JDBC Datasource like: * Open the Teradata JDBC Datasource and navigate to "Connection Pool configuration > Ping Query" section. * Add the required expression **SET QUERY_BAND='PROXYUSER=user_name;' FOR SESSION;** and click **Ok**. * Once done, **save** the Datasource and perform '**Test Connection**'. By doing this the QUERY_BAND will be set for the session established between Virtual DataPort and Teradata Database. You could refer to the [Parameters of the Connection Pool of a JDBC Data Source]( section of Virtual DataPort VQL Guide for more information. Hope this helps!
Denodo Team
27-03-2020 00:36:23 -0400
wow, thank you !!! I will try this. looks like the right direction.
27-03-2020 07:31:54 -0400
when you mention Open the Teradata JDBC Datasource and navigate to “Connection Pool configuration > Ping Query” section. are you implying using the denodo Virtual dataport admin tool? I don't see an option in there. I do see some options I believe which can be done at the vql command line level. will explore that.
27-03-2020 10:40:19 -0400
Hi Yes, you are correct. In Virtual DataPort Administration Tool, you could navigate to the server explorer and double-click on the Teradata data source that you have created. Then, in the data source **[Connection](** tab of the **configuration** tab, you will be able to see the **Connection Pool configuration**, click on that and add the below expression in the Ping query. Then, save the datasource. **SET QUERY_BAND='PROXYUSER=user_name;' FOR SESSION; ** For more information, please refer to the section [JDBC Sources]( of Virtual DataPort Administration Guide. Alternatively, you can also copy the VQL of your Teradata datasource and paste it in the VQL shell, edit the **VALIDATIONQUERY** with the above expression and execute. This alternative approach is equivalent to the Ping query change. Hope this helps!
Denodo Team
06-04-2020 03:15:44 -0400
ok. so I got further, instead of proxy user I used below and my query ran. SET QUERY_BAND = 'joe=shmo;' FOR SESSION ; validating with the dbas. not sure what I'm missing out on without proxyuser. if I can pass a name value pair period I would imageine that would be safe enough.
09-04-2020 13:47:13 -0400
the dbas did see it coming over. Now heres the other part of my equation. My front end app "A" connects to Denodo "B" and denodo connects to Teradata "C". the applicatin "A" is java spring using jdbc drivers to connect to denodo. how can I pass in the query band parameter there , skipping through denodo and ultimately executing in teradata. From our application standpoing, I want to identfy a QUERY_BAND=<<userid>> , so our teradata guys can triage apropriately. the poc in previous threads took care of it in denodo in the virtual data port tool. Our goal is to drop that seeting in denodo itself, and have it all dynamically passed in by the source app. do you have any syntax examples, if thats at all possible?
13-04-2020 08:28:08 -0400
Hi, For your scenario, you could make use of the pass-through session credentials by which you could use the username and password of your client application to establish the connection to Denodo which would then be passed to Teradata for executing queries. This way you can analyze the query band for the established session users. For more information, you could refer to the section [Considerations When Configuring Data Sources with Pass-Through Credentials]( of Virtual DataPort Administration Guide. If you need more clarifications and have a valid support account, I would recommend you to create a support case in the [Denodo Support Site]( Hope this helps!
Denodo Team
24-04-2020 06:01:38 -0400
You must sign in to add an answer. If you do not have an account, you can register here