TM1 Dimension Attribute 256 character limit work around
Posted: Tue Apr 21, 2009 12:21 pm
Hi Guys,
I am wanting to add a drill which basically dynamically creates the SQL string based on the SQL statements stored against the element as a text attribute.
For example in the "Account" dimension I would store the string "account=4001" where the element = 4001.
Now in the drill TI prolog it takes reads the SQL string attribute of each element in each dimension to build the appropriate SQL string.
pAccount = ATTRS('Account',pAccount,'Drill SQL Movex');
pDepartment = ATTRS('Department',pDepartment,'Drill SQL Movex');
pLocation = ATTRS('Location',pLocation,'Drill SQL Movex');
pGBU = ATTRS('GBU',pGBU,'Drill SQL Movex');
pSalesOffice = ATTRS('Sales Office',pSalesOffice,'Drill SQL Movex');
pCustomer = ATTRS('Customer',pCustomer,'Drill SQL Movex');
pProject = ATTRS('Project',pProject,'Drill SQL Movex');
The following variables are then substituted into the SQL string:
SELECT
Company,
AccountingDate,
Account,
CostCentre,
ProfitCentre,
Customer,
Project,
FunctionalCurrencyAmount,
JournalNum,
Desc1
FROM GeneralLedger
where ?pCompany?
and ?pYear?
and ?pPeriod?
and ?pAccount?
and ?pDepartment?
and ?pLocation?
and ?pGBU?
and ?pSalesOffice?
and ?pCustomer?
and ?pProject?
However some of these strings go beyond the 256 character limit.
Therefore my question is is there away I can store the SQL strings within text files and assign values to my turbo integrator variables directly from files. The files could simply be named identical to the element name. Thefore I could get around the 256 character limit.
Any help would be highly appreciated.. Please let me know if my question is not clear and I will try and explain it in more detail and use some graphics.
Thanks guys!
I am wanting to add a drill which basically dynamically creates the SQL string based on the SQL statements stored against the element as a text attribute.
For example in the "Account" dimension I would store the string "account=4001" where the element = 4001.
Now in the drill TI prolog it takes reads the SQL string attribute of each element in each dimension to build the appropriate SQL string.
pAccount = ATTRS('Account',pAccount,'Drill SQL Movex');
pDepartment = ATTRS('Department',pDepartment,'Drill SQL Movex');
pLocation = ATTRS('Location',pLocation,'Drill SQL Movex');
pGBU = ATTRS('GBU',pGBU,'Drill SQL Movex');
pSalesOffice = ATTRS('Sales Office',pSalesOffice,'Drill SQL Movex');
pCustomer = ATTRS('Customer',pCustomer,'Drill SQL Movex');
pProject = ATTRS('Project',pProject,'Drill SQL Movex');
The following variables are then substituted into the SQL string:
SELECT
Company,
AccountingDate,
Account,
CostCentre,
ProfitCentre,
Customer,
Project,
FunctionalCurrencyAmount,
JournalNum,
Desc1
FROM GeneralLedger
where ?pCompany?
and ?pYear?
and ?pPeriod?
and ?pAccount?
and ?pDepartment?
and ?pLocation?
and ?pGBU?
and ?pSalesOffice?
and ?pCustomer?
and ?pProject?
However some of these strings go beyond the 256 character limit.
Therefore my question is is there away I can store the SQL strings within text files and assign values to my turbo integrator variables directly from files. The files could simply be named identical to the element name. Thefore I could get around the 256 character limit.
Any help would be highly appreciated.. Please let me know if my question is not clear and I will try and explain it in more detail and use some graphics.
Thanks guys!