
Advanced Parameters in Turbo Integrator
-
- Posts: 10
- Joined: Thu Feb 21, 2013 8:02 am
- OLAP Product: TM1
- Version: 9.5.2
- Excel Version: 2007
- Contact:
Advanced Parameters in Turbo Integrator
Hi guys... Im now struggling using tm1 process using advanced parameters tab. I need to import data from oracle data source to cube. Data source Query result shows some variables, one of them has 'Year' variable. Query result shows 'year' : 2008, 2009, 2010, etc. Now Im thinking how to make a year parameter, so I need to create paramater in tab advanced, then parameters, then I insert new parameter, pYear. On Data tab, I write it : pYear = vYear; It caused when I run the process, dialog box popped up and ask me to insert the year. so when I insert year : 2008, only data with year 2008 will be imported to cube. The problem is, even though I tried to insert one of year like 2008, data still imported for all years. Can you help me to figure this out, how can I just filter one of the name of the year? Any guide would help me a lot, sorry for poor english... 

- Michel Zijlema
- Site Admin
- Posts: 712
- Joined: Wed May 14, 2008 5:22 am
- OLAP Product: TM1, PALO
- Version: both 2.5 and higher
- Excel Version: 2003-2007-2010
- Location: Netherlands
- Contact:
-
- Site Admin
- Posts: 6647
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Advanced Parameters in Turbo Integrator
"Parameters, yur doing it wrong."Guang Ming wrote:Hi guys... Im now struggling using tm1 process using advanced parameters tab. I need to import data from oracle data source to cube. Data source Query result shows some variables, one of them has 'Year' variable. Query result shows 'year' : 2008, 2009, 2010, etc. Now Im thinking how to make a year parameter, so I need to create paramater in tab advanced, then parameters, then I insert new parameter, pYear. On Data tab, I write it : pYear = vYear; It caused when I run the process, dialog box popped up and ask me to insert the year. so when I insert year : 2008, only data with year 2008 will be imported to cube. The problem is, even though I tried to insert one of year like 2008, data still imported for all years. Can you help me to figure this out, how can I just filter one of the name of the year? Any guide would help me a lot, sorry for poor english...
The place that you need to assign the year parameter is in the SQL statement that you use to query the results from Oracle. That would look something like this:
Code: Select all
select COMPANY
, ACCOUNT
, DEPT
, FISCAL_YEAR
, ACCOUNTING_PERIOD
, POSTED_AMT
from YOURTABLE
Code: Select all
select COMPANY
, ACCOUNT
, DEPT
, FISCAL_YEAR
, ACCOUNTING_PERIOD
, POSTED_AMT
from YOURTABLE
where FISCAL_YEAR = ?pYear?
If you are entering the parameter into the process' dialog, that's it, you're done. But if you're running the process as part of a chore and are picking up the year from, say, a control cube so that you don't have to manually enter it, you assign the value that you've read from the control cube not in the Data tab, but in the Prolog tab.
The prolog tab is run before any data is read. Supposing that you enter 2008 as the year, then what will happen is that:
- The Prolog tab will run; and
- The SQL code will be changed to read
Code: Select all
select COMPANY
, ACCOUNT
, DEPT
, FISCAL_YEAR
, ACCOUNTING_PERIOD
, POSTED_AMT
from YOURTABLE
where FISCAL_YEAR = 2008
I note from the e-mail alerts that Michel beat me to this one but since I'm already this far through mine I'll post it anyway.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Posts: 10
- Joined: Thu Feb 21, 2013 8:02 am
- OLAP Product: TM1
- Version: 9.5.2
- Excel Version: 2007
- Contact:
Re: Advanced Parameters in Turbo Integrator
Cool... It works for me... Thanks a lot... Here is what I've made :
select columnA, columnB, columnC
from mytable
where columnC = '?pYear?'
variables are : vColumnA, vColumnB, vColumnC
then I go to parameter tab and insert new one.
On Data tab, I put CellPutN(vcolumnB, 'cubeName', vColumnA, vColumnB, pYear);
note: vColumnA and vColumnB is dimension for A and B.
Hopefully I do a right thing and it works too for us..
Thanks again for sharing.
select columnA, columnB, columnC
from mytable
where columnC = '?pYear?'
variables are : vColumnA, vColumnB, vColumnC
then I go to parameter tab and insert new one.
On Data tab, I put CellPutN(vcolumnB, 'cubeName', vColumnA, vColumnB, pYear);
note: vColumnA and vColumnB is dimension for A and B.
Hopefully I do a right thing and it works too for us..
Thanks again for sharing.
-
- Site Admin
- Posts: 6647
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Advanced Parameters in Turbo Integrator
I can't see that working.Guang Ming wrote:Cool... It works for me... Thanks a lot... Here is what I've made :
select columnA, columnB, columnC
from mytable
where columnC = '?pYear?'
variables are : vColumnA, vColumnB, vColumnC
then I go to parameter tab and insert new one.
On Data tab, I put CellPutN(vcolumnB, 'cubeName', vColumnA, vColumnB, pYear);
note: vColumnA and vColumnB is dimension for A and B.
You say that vColumnB is the name of a dimension (dimension element, I would hope you meant). That's fine, that's not a problem.
The problem is that for it to be an element name it would need to be a string.
However the value that you are passing to the CellPutN function is also vcolumnB. For that to work, it would need to be a numeric value (since CellPutN only works with those) but if it's numeric, then obviously it can't be a string which can be used as an element name. The reverse is also true.
The other thing is that I really wouldn't put pYear as the year dimension argument. It should work, but it's potentially misleading. You're getting the year back as vColumnC, and I think you should really use that.
Shouldn't it always be the same, I hear you ask?
Well, yes, it should... but I'd be just very wary about using a value that is not being supplied by the data source. If somehow (and no, I grant you that I can't think of how) but if somehow you get a row of data coming through with a bad year then you'd never detect it that way. The CellPutN would be using the parameter value and would think that everything is fine, when it's not. It's really only a "belts and braces" precaution.
But the issue regarding vColumnB is not; it can be either a number or a string, but it can't be both.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Posts: 10
- Joined: Thu Feb 21, 2013 8:02 am
- OLAP Product: TM1
- Version: 9.5.2
- Excel Version: 2007
- Contact:
Re: Advanced Parameters in Turbo Integrator
Hi Alan Kirk...
Sorry for long response..
Yeah, that is what I meant.. It's so clear explanation man. Thanks again for your help...
Sorry for long response..
Yeah, that is what I meant.. It's so clear explanation man. Thanks again for your help...
