Can I add a comment line in the query box in turbo integrator

Post Reply
davidh
Posts: 11
Joined: Thu Nov 29, 2012 2:19 am
OLAP Product: TM1
Version: 10.2.1.1 IF2
Excel Version: 2013

Can I add a comment line in the query box in turbo integrator

Post by davidh »

Hi all.

Is there an option to add a comment line in the Query box on the data source page in turbo integrator. We have many processes with SQL queries inside this query box and they don't work if there are any comment lines starting with -- which is perfectly fine in SQL. I understand you can use # in the prolog, metadata and data tabs, but this too does not work in the query box on the data source page.

Apologies if this is really basic, but I have not been able to find an answer anywhere.

Regards

David
Wim Gielis
MVP
Posts: 3240
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Can I add a comment line in the query box in turbo integrator

Post by Wim Gielis »

Hello David,

Would it be an option if you use a really basic, quick, query in the Data source query box - and in the Prolog tab you set the real query using the variable DataSourceQuery ?
The first query should return all the correct fields to set the variables in the Variables tab, but other than that, the real query is set at run-time near the end of the Prolog tab.

Wim
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
User avatar
Ajay
Regular Participant
Posts: 183
Joined: Wed May 14, 2008 8:27 am
OLAP Product: TM1
Version: 10.2.0, PA 2.0.9
Excel Version: 2016
Location: London

Re: Can I add a comment line in the query box in turbo integrator

Post by Ajay »

David

I have used the following which is suggested by Wim, which works for me.

In the "Query" box on the Datasource tab, I simply have the query to identify the columns needed on the Variables tab of the TI, which once set, I then remove the login credentials.

In the "Prolog" though I have comments added to the query, eg

#****Begin: Generated Statements***
#****End: Generated Statements****

# ==============================================================================
# Datasource connection details
# ==============================================================================
DataSourceType='ODBC';

DatasourceNameForServer='Name of ODBC';
DatasourceNameForClient='Name of ODBC';

DatasourceUserName='UserName for ODBC';
DatasourcePassword='Password for UserName of ODBC';



# ==============================================================================
# Datasource query
# ==============================================================================

DatasourceQuery =

'Select' |

# add text or comments needed for SQL query

'Column 1, Column 2' |

'from Database' ;
Hope this helps.

Ajay
Douard
Posts: 5
Joined: Wed Apr 01, 2009 11:52 am
Version: 9.4
Excel Version: 2007

Re: Can I add a comment line in the query box in turbo integrator

Post by Douard »

Hi

You can add a comment if you use the syntax /* ENTER COMMENT HERE */

This works across single or multiple lines. The fact that you cannot use -- is frustrating but the /**/ work just as well.

Douard
davidh
Posts: 11
Joined: Thu Nov 29, 2012 2:19 am
OLAP Product: TM1
Version: 10.2.1.1 IF2
Excel Version: 2013

Re: Can I add a comment line in the query box in turbo integrator

Post by davidh »

Thanks for the responses guys.

Douard, not sure why I never even tried that one, so thanks. Works fine.

A couple of interesting options to consider from Wim and Ajay. Thanks for your help.
Post Reply