Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm a newbie to QV (but not BI e.g. SSAS etc).
In my LOAD script I would like to set the value of a variable that has its definition stored in
a database.
Scenario:
We have a Business Dictionary in our DW (SQLServer 2012) and in it I will define a
variable called _vExecutable it will be defined with a script line of let vCurrentYear = Lookup ('Year','Date_Key','$(zLastCompletePeriod)','CALENDAR');
Of course,If I hardcoded this in the LOAD Script it would be as let vCurrentYear = Lookup('Year','Date_Key','$(zLastCompletePeriod)','CALENDAR');
But as stated we dont want to do this except where absolutely necessary
Requirement:
I would like to substitute the LET statement with a Variable that defines _vCurrentYear , in a nutshell , execute variables as script lines
Can you see where Im heading with this ?
We dont want to hard code environment variables in the LOAD script, we want to utilise our dictionary
as much as possible as this is the one stop repository for business definitions and calculations (formulas)
Result:
I did test this using EXECUTE _vExecutable but get a "Script Line Error" , the error window does imply something did actually work as I see a value embedded in the 'Date_Key' field.
Any feedback gratefully received, thanks in advance
Paul
(Brisbane, Qld)
EXECUTE statement is not appropriate here. If you have a variable that contains a valid script statement, the way to run that statement in the script is to type a script line that references the variable like this.
$(_vExecutable);
-Rob
EXECUTE statement is not appropriate here. If you have a variable that contains a valid script statement, the way to run that statement in the script is to type a script line that references the variable like this.
$(_vExecutable);
-Rob
Rob, Many thanks , this is exactly what we need.