Beruflich Dokumente
Kultur Dokumente
These slides represent the work and opinions of the presenter and do not constitute official positions of Hyperion or any other organization. This material has not been peer reviewed and is presented here with the permission of the presenter. This material should not should not be reproduced without the written permission of interRel Consulting.
Find out more at www.interrel.com Search lulu.com for Essbase to see all 3 books
2 Copyright 2007, Hyperion. All rights reserved.
Automation via MaxL Scripts (And How to Break Yourself Away From EssCMD)
Agenda
Describe uses for MaxL scripts Explain how to create and save a MaxL script Describe different commands within MaxL Demonstrate how to write a simple MaxL script List the steps to run a MaxL script New features / enhancements to MaxL Q&A
Overview of MaxL
Replacement for EssCMD scripting language
Full support was not available until 7.0 EssCMD-to-MaxL conversion utility: cmd2mxl.exe
Can be used within other programming languages such as Perl and Python (available on www.essbase.com) I/O can be redirected (STDIN/STDOUT/STDERR) Built-in editor with auto-completion in EAS
import database sample.basic dimensions from data_file '/data/calcdat.txt' using rules_file '/data/rulesfile.rul' on error append to '/logs/dimbuild.log';
import database sample.basic data from data_file '/data/calcdat.txt using rules_file '/data/rulesfile.rul' on error write to '/logs/dimbuild.log';
execute calculation Sample.Basic.calcname; Or execute calculation 'SET MSG ERROR; CALC ALL;' on Sample.basic;
Exports all data concurrently to a list of file names: export database sample.basic data to data_file 'D:\\fileout','D:\\fileout2','D:\\fileout3'; Exports input data to a file: export database sample.basic input data to data_file 'exp_input.exp'; Executes a report script: export database sample.basic using report_file '$ARBORPATH/App/Sample/Basic/asym.rep to data_file 'home/month2.rpt';
Creates a user called Fiona with the password sunflower: create user Fiona identified by sunflower; Creates a user called Guest with the password password, and adds Guest to the group called Visitors. Quotation marks are required because password is a MaxL keyword: create user Guest identified by 'password member of group Visitors;
Changes the number of seconds to wait for blocks to be unlocked. If a transaction request is made which cannot be granted in 120 seconds, the transaction is rolled back until a lock can be granted:
alter database Sample.Basic set lock_timeout after 120;
Displays information about all databases on the system: display database; Displays information about the Sample.Basic database: display database Sample.Basic;
There is no Validate option for MaxL scripts You test and troubleshoot by actually running the MaxL script This should be done in a development environment with a subset of data
20
1.
2.
Select MaxL >> Execute from the Menu The results are displayed within EAS
Finding Help
Variables in Script
Type essmsh followed by a file name followed by an argument or list of space-separated arguments Essmsh remembers the command-line arguments, which can be referenced as $1, $2, etc. in the specified file. If spooling is turned on, all variables are expanded in the log file. Example:
D:\Scripts> essmsh filename.mxl Fiona sunflower localhost newuser
Variables in Script cont. Starts the shell to read MaxL statements from filename.msh, located in the current directory. Contents of script filename.msh:
spool on to $HOME\\output\\filename.out; login $1 $2 on $3; create user $4 identified by $2; echo "Analytic Services is installed in $ARBORPATH"; spool off; exit;
32
33
Process
Step 1 ESSMSH gk
Generates a key pair
Public and private key Step 2 essmsh E script_name public_key Step 3 Maxl will parse out that information and generate a new file XXX.MLS Step 4 Move main script to private directory
Process
Same process to decrypt, using the ESSMSH D option
Run As
Introduced for batch bursting in Financial Reporting Use for security testing in Analytic Services Report script and MDX batch query execution New Invocation modes:
ESSMSH la: login as another user
38
So How do I Migrate?
Manually cmd2mxl
39
40
All strings in the ESSCMD scripts should be surrounded by double quotation marks ("")
41
42
44
Training Classes
Hyperion Planning Accelerated Fundamentals
Monday, April 21-24th Advanced Hyperion Planning Friday, April 25th Interactive Reporting: Analyze & Report for End Users Monday, May 12th Interactive Reporting: Report & Dashboard for End Users Tuesday, May 13th 14th