I have an import database MAXL command that is working great (sql account and password substituted). The rule file has a SQL connection to our ERP.
MAXL> import database PLANNING.DetView data connect as sql_account identified by "Password" using rules_file "'\\\oceanus-d13\\Oracle\\Middleware\\user_projects\\epmsystem3\\EssbaseServer\\essbaseserver1\\app\\PLANNING\\DetView\\NLIncur.rul'" on error write to "'G:\\DB_Process\\DetView_Process\\errors\\DetView_NLIncur_data_load.mxl.err'";
We are going to run this on a nightly basis and our requirement is to have a historical record of what was "pulled" from our ERP (even if it didn't make it in to Hyperion).
Here are the options that I've thought of:
I can't find another option in the import database command to spool the output of the SQL to a file.
Does anybody have thoughts on how to do this or are there other ways to achieve what I'm trying to do?
The SQL run via the load rule understands my subvars. The load rule SQL looks like this:
AND (('1' = '&IncSpanYr' --IF THE PERIODS SPAN YEARS
AND (('12' = '&CurMoNm' --IN JUNE LOOK INTO NEXT YEAR PERIOD 1
AND ((A.FISCAL_YEAR = '&CurYrNm' AND A.ACCOUNTING_PERIOD IN ('&PriMoNm', '&CurMoNm'))
This turns into:
AND (('1' = '1' --IF THE PERIODS SPAN YEARS
AND (('12' = '12' --IN JUNE LOOK INTO NEXT YEAR PERIOD 1
AND ((A.FISCAL_YEAR = '2014' AND A.ACCOUNTING_PERIOD IN ('2', '3'))
My issue is getting a dump of all that data that the SQL is pulling. I don't see a way to do that in the import database command. A separate job on the SQL side (like SSIS) could pull the data, but can't access the subvars easily. Does that make sense? Or did I misunderstand your suggestion?
What I was saying was in your script add another maxl statement which will which pull those subvars
display variable IncSpanYr;
spool the output to a file and then you can make use of OS scripts to read the values of those.
Create the exact same sql and then replace IncSpanYr with the value from Essbase.