String size limit of a parameter in a TI
-
- Posts: 139
- Joined: Tue May 21, 2019 3:33 pm
- OLAP Product: TM1
- Version: PA 2.0.x
- Excel Version: 2016
- Location: The Internet
String size limit of a parameter in a TI
Hello everybody,
Based on this link, TurboIntegrator is capable of handling string data in sizes of up to 8000 single-byte characters at a time.
I have to execute a process with a 200+ characters in one of my parameter. and it keeps crashing. I wonder what is the string size limit of a parameter value in a TI ?
Thanks and have a good day.
Based on this link, TurboIntegrator is capable of handling string data in sizes of up to 8000 single-byte characters at a time.
I have to execute a process with a 200+ characters in one of my parameter. and it keeps crashing. I wonder what is the string size limit of a parameter value in a TI ?
Thanks and have a good day.
- paulsimon
- MVP
- Posts: 808
- Joined: Sat Sep 03, 2011 11:10 pm
- OLAP Product: TM1
- Version: PA 2.0.5
- Excel Version: 2016
- Contact:
Re: String size limit of a parameter in a TI
Hi
It can depend on how you are passing the parameter. If you are passing it from an Action Button via Excel then I believe the limit is only 255 chars, but this is due to a limitation in Excel rather than TI.
I have never really needed to pass a parameter that big, but in TI I have certainly built up strings of SQL to be executed that have been over 30,000 characters (in PA 2.0.5 although I would not expect 10.2.2 to be that different).
Regards
Paul Simon
It can depend on how you are passing the parameter. If you are passing it from an Action Button via Excel then I believe the limit is only 255 chars, but this is due to a limitation in Excel rather than TI.
I have never really needed to pass a parameter that big, but in TI I have certainly built up strings of SQL to be executed that have been over 30,000 characters (in PA 2.0.5 although I would not expect 10.2.2 to be that different).
Regards
Paul Simon
-
- MVP
- Posts: 1815
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: String size limit of a parameter in a TI
For the strings you are passing I wonder if there are any special characters? The sizes don’t seem likely to be a problem but maybe the content is doing something spurious.
Declan Rodger
- paulsimon
- MVP
- Posts: 808
- Joined: Sat Sep 03, 2011 11:10 pm
- OLAP Product: TM1
- Version: PA 2.0.5
- Excel Version: 2016
- Contact:
Re: String size limit of a parameter in a TI
Good point Declan. I recently had an issue where someone had used a hard-return in the column heading of an Excel worksheet and then saved it as a CSV file. When read in, it made the TI miss out something like the first 500 lines of the file. It wasn't something you could detect and fix in the TI because those lines never got read in by the TI. However, that was with reading in a CSV rather than passing parameters. However, if the parameter is being passed in from Excel by an Action Button then it could be an issue.
Regards
Paul Simon
Regards
Paul Simon
-
- Posts: 139
- Joined: Tue May 21, 2019 3:33 pm
- OLAP Product: TM1
- Version: PA 2.0.x
- Excel Version: 2016
- Location: The Internet
Re: String size limit of a parameter in a TI
Thanks guy,
I pass the parameter through an ExecuteProcess in a TI.
I have the following code I want to execute in one of my master TI :
And I did some test and here's the result
Process completed successfully
Process completed successfully
Process completed with minor errors. ...
and here's the error message:
And line 246 is:
Do you think there is a maximum of 100 characters ?
Any thoughts ?
I pass the parameter through an ExecuteProcess in a TI.
I have the following code I want to execute in one of my master TI :
Code: Select all
sMDX = '{TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SORT( {TM1SUBSETALL( [Process Control Element] )}, ASC)}, 0)}, "*User*")}';
ExecuteProcess( 'SYS - Create Subset',
'pCubeName', 'Process Control',
'pViewName', sViewName,
'PDimName', 'Process Control Element',
'pMDX', sMDX );
Process completed successfully
Code: Select all
sMDX = '{TM1SORT( {TM1SUBSETALL( [Process Control Element] )}, ASC)}';
Code: Select all
sMDX = '{TM1FILTERBYLEVEL( {TM1SORT( {TM1SUBSETALL( [Process Control Element] )}, ASC)}, 0)}';
Code: Select all
sMDX = '{TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SORT( {TM1SUBSETALL( [Process Control Element] )}, ASC)}, 0)}, "*User*")}';
Code: Select all
Error: Prolog procedure line (246): Could not create dynamic subset: Syntax error at or near: '', character position 99 expression:
{TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SORT( {TM1SUBSETALL( [Process Control Element] )}, ASC)
Code: Select all
SubsetCreatebyMDX( sSubsetName, sMDX);
Any thoughts ?
-
- Community Contributor
- Posts: 324
- Joined: Mon Jul 02, 2012 9:39 pm
- OLAP Product: TM1
- Version: PAL 2.0.8
- Excel Version: 2016
- Location: Sydney, Australia
Re: String size limit of a parameter in a TI
No, issue is with your MDX statement at position 99, try replacing ' " ' around *User* with sQuote = CHAR (34)
sMDX = '{TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SORT( {TM1SUBSETALL( [Process Control Element] )}, ASC)}, 0)}, ' | sQuote |'*User*'| sQuote| ')}';
sMDX = '{TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SORT( {TM1SUBSETALL( [Process Control Element] )}, ASC)}, 0)}, ' | sQuote |'*User*'| sQuote| ')}';
-
- MVP
- Posts: 3118
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: String size limit of a parameter in a TI
Your code works fine provided you fill out the dimension name and pattern.
Here's my test code:
Code: Select all
sMDX = '{TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SORT( {TM1SUBSETALL( [Consultant] )}, ASC)}, 0)}, "*Wim*")}';
Subsetcreatebymdx( 'test', sMDX );
Also, make sure at least 1 element qualifies for the MDX selection. If not the MDX will give an error (unless you suppress the error with an optional additional argument).
Best regards,
Wim Gielis
IBM Champion 2024
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
Wim Gielis
IBM Champion 2024
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
-
- Posts: 139
- Joined: Tue May 21, 2019 3:33 pm
- OLAP Product: TM1
- Version: PA 2.0.x
- Excel Version: 2016
- Location: The Internet
Re: String size limit of a parameter in a TI
Thanks Guys,
I appreciate it !
I appreciate it !
- paulsimon
- MVP
- Posts: 808
- Joined: Sat Sep 03, 2011 11:10 pm
- OLAP Product: TM1
- Version: PA 2.0.5
- Excel Version: 2016
- Contact:
Re: String size limit of a parameter in a TI
Hi
Also when you run a TI process always check the return code eg
vRet = ExecuteProcess(...)
IF( vRet <> ProcessExitNormal() ) ;
.... Some error handling
ENDIF ;
Also when you run a TI process always check the return code eg
vRet = ExecuteProcess(...)
IF( vRet <> ProcessExitNormal() ) ;
.... Some error handling
ENDIF ;
-
- MVP
- Posts: 3118
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: String size limit of a parameter in a TI
Best regards,
Wim Gielis
IBM Champion 2024
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
Wim Gielis
IBM Champion 2024
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
-
- Posts: 139
- Joined: Tue May 21, 2019 3:33 pm
- OLAP Product: TM1
- Version: PA 2.0.x
- Excel Version: 2016
- Location: The Internet
Re: String size limit of a parameter in a TI
Yes.. I made a rookie mistake..
I had a something like this in my code:
Code: Select all
SUBST( sMDX, 1, 100)
At least I know for sure there is no string size limit !!
Thanks !
-
- MVP
- Posts: 3118
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: String size limit of a parameter in a TI
Emixam wrote: ↑Tue Feb 04, 2020 2:29 pm I had a something like this in my code:That's why I only get the first 100 characters..Code: Select all
SUBST( sMDX, 1, 100)
Thanks !
Even with that tiny font size 8 or so in TM1 Architect you could have spotted that one faster
Best regards,
Wim Gielis
IBM Champion 2024
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
Wim Gielis
IBM Champion 2024
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
-
- Posts: 4
- Joined: Thu Feb 25, 2021 9:24 pm
- OLAP Product: TM1 / IBM Planning Analytics
- Version: 2.0.9.10
- Excel Version: 2019
- Contact:
Re: String size limit of a parameter in a TI
Hi guys,
I know this discussion is old but in case someone is looking for the limit size of a string TI parameter, I did the test with PAL 2.0.9.10. It is equal to 65535 characters.
Cheers
I know this discussion is old but in case someone is looking for the limit size of a string TI parameter, I did the test with PAL 2.0.9.10. It is equal to 65535 characters.
Cheers