Maxl to import datafolders

I want to make an maxl script to import all files in a specific folder. These files are variable, but all have the same layout.
The script I have created:
set varPath = 'P:\\WM\\Finance & Control\\Controlling\\Business Control\\Latest Estimate\\LE 01\\2011\\upload\\';
set varFileA = 'upload file1.xls';
set varFileB = 'file2 upload.xls';
set varFileC = 'file3 upl.xls';
import database 'WM_T2'.'WM_T' data from data_file "$varPath$varFileA" using server rules_file 'testle1' on error append to "$varPath$varErrorfile";
import database 'WM_T2'.'WM_T' data from data_file "$varPath$varFileB" using server rules_file 'testle1' on error append to "$varPath$varErrorfile";
import database 'WM_T2'.'WM_T' data from data_file "$varPath$varFileC" using server rules_file 'testle1' on error append to "$varPath$varErrorfile";
Is it posible to load all files in the folder without naming them in maxl? For example:
import database 'WM_T2'.'WM_T' data from data_file "$varPath*.xls" using server rules_file 'testle1' on error append to "$varPath$varErrorfile";
Thanks in advance
Edited by: Chris on 24-feb-2011 6:02

This is the script I made. Comments are in dutch but the cmd speaks for itself. Maybe other Essbase users can use this:
set Username=
set Password=
set Essserver=
set Application='WM_M'.'WM_MFIN'
set Errorfile=errorlogLE1.txt
set Logfile=WMEssbaselogLE1.txt
REM ------------------ GEEF SCRIPTNAAM OP DIE NA HET INLEZEN MOET WORDEN GESTART --------------------
set Calculationscript='CalcLE'
REM ------------------ GEEF BESTEMMINGSMAP OP WAAR DE VERWERKTE BESTANDEN EN LOG NAARTOE MOETEN WORDEN VERPLAATST 2x--------------------
md "W:\2011\verwerkt\verwerkt-%date%-%time%\"
set outputdirectory=W:\2011\verwerkt\verwerkt-%date%-%time%\
REM ---------------- HIERONDER STAAT HET MAXL SCRIPT -----------------------
ECHO /* MAXL Script voor uploaden van folders*/ > %MaxlFile%
ECHO set timestamp on; >> %MaxlFile%
ECHO spool on to '%outputdirectory%%Logfile%';>> %MaxlFile%
ECHO echo '************* LOGGING IN TO ESSBASE *****************';>> %MaxlFile%
ECHO login %Username% %Password% on %Essserver%; >> %MaxlFile%
ECHO echo '************* UPLOADING *****************'; >> %MaxlFile%
REM ---------------- HIERONDER STAAT DE LOOP VAN DE FOLDER, VOOR ELK BESTAND WORDT EEN REGEL AANGEMAAKT --------------------------
for /F %%a in ('dir /b %inputdirectory%%inputfiletype%') do (
ECHO import database %Application% data from data_file '%Inputdirectory%%%a' on error append to "%outputdirectory%%Errorfile%"; >> %MaxlFile%
ECHO /* Calculate database */ >> %MaxlFile%
ECHO execute calculation %Application%.%Calculationscript%; >> %MaxlFile%
ECHO echo '************* LOGGING OUT *****************';>> %MaxlFile%
ECHO logout;>> %MaxlFile%
ECHO set timestamp off; >> %MaxlFile%
ECHO spool off; >> %MaxlFile%
ECHO exit; >> %MaxlFile%
REM ---------------- UITVOEREN VAN AANGEMAAKT SCRIPT --------------------------
essmsh -l %Username% %Password% -s %Essserver% %Maxlfile%
REM ---------------- VERPLAATSEN VAN GEUPLOADE BESTANDEN EN STARTEN VAN LOGFILE MET RESULTAAT UPLOAD --------------------------
MOVE /Y "%inputdirectory%%inputfiletype%" "%outputdirectory%"
start notepad "%outputdirectory%%Logfile%"

Similar Messages

  • MAXL to IMPORT DATA

    Hi All,
    Can you please help me in writing maxl script for the following scenario?
    I have ASO cube, I need to export level 0 data from it and then load it back to the cube.
    In between them, I will have to update the dimensions. I know maxl scripting for loading data, dimensions, exporting, importing but
    When I export lvl0 data to a location, if it writes to multiple files [2gb each]. How can I write maxl to import data with these multiple files. {cache: I dont know how many files it will export}
    Please help..!!
    Thanks.

    You could simply restructure 'in place' - you don't necessarily have to export / clear / restructure / reload.
    But if you do go the reload route look at this thread for some tips from Robert and Glenn on handling an unknown number of export files - Importing spanned export files in MaxL
    In BSO the 'import data' statement will now handle wildcards, e.g. 'export*.txt' but this functionality hasn't been added to the ASO version of the command (at least per the documentation; I haven't actually tested it).
    Glenn, yeah - lack of column export can be a major PITA. I've wasted more than a few hours of my life working through renamed members one-by-one in dozens of export files...

  • MaxL for Import of Data & Dimension info using an ODBC source (Oracl based)

    See below for syntax issues with using the SQL Interface with MaxL to load first a dimension, then data. (Any one have experience with getting the exact syntax for this?) ThanksMAXL> import database ESSBASE_APPNAME.ESSBASE_DBNAME dimensions connect as ORACLE_USER identified by ODBC_DEFINITION using rules_file LdJob; 6 - (1) Syntax error near end of statement. 50 - MaxL compilation failed.MAXL> import database ESSBASE_APPNAME.ESSBASE_DBNAME data connect as ORACLE_USER identified by ODBC_DEFINITION using rules_file LdTurn; 6 - (1) Syntax error near end of statement. 50 - MaxL compilation failed.

    I think i got my error. I have to say 'import database dimensions from data_file........' instead of 'import database data from data_file............'. I dont know how to delete this post so i am not deleting it.

  • MAXL Filter Import

    I have a need to import security filters where a user may have multiple Reads and/or writes. I have been unsuccessful thus far in creating an import of anything other than a "no_access on" filter. I would greatly appreciate an example of a no_access, read, write filter example. I would also like any advice on multiple read/writes within the same filter.<BR><BR>Thanks in advance,<BR>Steve Wyatt

    Try something like this:<BR><BR>create or replace filter Sample.Basic.test1 read on '@IDESCENDANTS("Market")', write on '@IDESCENDANTS("East"), "Budget"', no_access on '@IDESCENDANTS("Bottle")';<BR><BR>-R

  • Looping in Maxl Script - To load multiple files

    Hi,
    I am using Essbase 11.1.2 on UNIX.
    I have maxl script which will load 20 to 30 extraction file. Number is inconsistent. Extraction files will grow each month. Extraction files are with same name with the suffix _1,_2...(2 Gb thing). My previous script was hard coded to load file by file to load up to 50 files. I am trying to remove these hard coded lines, and try to loop the “load” statement. I have tried several ways using while loop in shell to call maxl /msh , but no luck. Any ideas?
    Thanks

    A very similar question was asked recently (but for Windows): Re: Maxl to import datafolders
    What have you tried? Maybe someone here can show you what's wrong with your script.
    The approach I usually take with this type of problem is to write a script that dynamically builds one single MaxL script with the appropriate number of files, rather than calling MaxL multiple times.
    I am generally too ashamed to share my Unix scripts, but at it's most basic, non-error-trapped, probably-inadvisable-and-full-of-holes-for-all-kinds-of-reasons, you could include something like this to build your load script:
    ls filename*.txt | awk {'print "import database etc... "$1" ...on error etc;"'} > scriptname.mshSince you can nest MaxL scripts, you can then reference scriptname.msh from a static 'master' script which handles login / spool on / spool off / logout as appropriate. See http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_tech_ref/maxl_commands_nesting.html or Cameron's 2009 K'scope presentation: http://odtug.com/apex/f?p=500:575:526121996615242::NO::P575_CONTENT_ID:4605

  • Essbase - MaxL import dimensions

    Hi everybody,
    I have to update a dimension on my Essbase ASO application (only metadata). It is an incremental load dimension starting from a txt file containing all the elements, either those that currently are in the dimension. I'm using the MaxL statement Import dimensions by server rules file. Although, i'm wondering what the clause "preserve alla data" will do? What happens if i do not insert this clause when importing dimensions? After the the import i have to save the outline or launch the restructure?
    Thank you in adavance guys,
    Maurizio

    Hi Celvin,
    thnks for your answer. So, If i launch the following Maxl Script without the clause "preserve all data" i could lose all the data stored in the db?
    import database sample.basic dimensions
    from data_file 'test.txt'
    using rules_file 'test.rul'
    on error append to 'test.log'
    I tried on the ASOSample and the data haven't been cleared. There may be some options at applicatoin level or server level that effect how it works? could it be a safety clause in case of an abnormal shutdown during the import process?
    I know it's obviously better to put always the "preserve alla data" clause, but at the moment i'm evaluating the functionality of some existing scripts and i want to understand how they works.
    Thank you very much
    Maurizio

  • Essbase JAPI maxl session gives NPE with import statement

    Anybody know why I get a NPE from the Java API when trying to use the IEssMaxlSession to do an import? Here's my code snippet. I've verified the session work using the simpler maxl command commented out below. I also know the import syntax is OK at the maxl prompt. Essbase Error(0) isn't the most helpful diagnostic I've come across.
    Thanks
    IEssMaxlSession maxlSess = null;
    try {
         maxlSess = olapSvr.openMaxlSession("Maxl Test");
                   try {
                        String maxl;
    //                    maxl = "display database \"184_r\".rep";
                        maxl = "import database \"184_a\".agg dimensions connect as \"admin\" identified by \"password\" using server rules_file '/TmpltRFs/RFs/Plan.rul' on error write to \"errlog.log\"";
                        logger.debug(maxl);
         maxlSess.execute(maxl);
         printMessages(maxlSess.getMessages());
                   } catch (EssException e) {
                        printMessages(maxlSess.getMessages());
                        logger.debug(e.getMessage());
                        e.printStackTrace();
    } catch (EssException e){
         logger.debug(e.getMessage());
    14:47:40 DEBUG (essbase.RunMaxl 109): Cannot execute maxl statement. Essbase Error(0): java.lang.NullPointerException
    com.essbase.api.base.EssException: Cannot execute maxl statement. Essbase Error(0): java.lang.NullPointerException
         at com.essbase.server.framework.EssOrbPluginDirect.ex_olap(Unknown Source)
         at com.essbase.server.framework.EssOrbPluginDirect.executeMaxlStatement(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin._invokeMaxlMethod(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin._invokeMethod2(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin._invokeMethod(Unknown Source)

    This is due to the unpublished Bug 12661416: MAXL STATEMENT IMPORT DB DIMENSIONS FROM RELATIONAL DATABASE FAILS WITH JAPI. This error is not fixed in next release.
    However, there is one workaround.
    "As a workaround we installed Essbase client 9.3.1 on the epm11 test box, copied native libraries from 9.3.1 admin server and connected to maxl shell from the v 9.3.1 maxljni interface. This seems to work fine."
    Edited by: Karthik_P on Apr 9, 2012 1:12 PM

  • Multiple DimBuilds w/Only One Restructure in MaxL?

    I am doing a series of dimension builds via load rules (v7.1.5). In this case I am building this entire dimension from scratch every time, but I want to preserve data, because there is forecast and plan data in this cube, not just actuals. My problem is this: In order to build completely from scracth, my first dimbuild load rule has "Remove Unspecified" turned ON. But that that dimbuild does not include all the level 0 members I will end up adding to this dimension by the end of this process. And I cannot find a way to delay Essbase from performing the restructure until the last dimbuild. I have tried using the "suppress verification" option in MaxL's import dimension command, but it doesn't accomplish this. I cannot find anything in the MaxL docs that refers to this and no one I work with has an answer. There has to be a way to do this, doesn't there? Otherwise I will have to abandon this "build from scratch" methodology and just leave old, dead members lying around in this dimension until they are removed manually.<BR><BR>Thanks,<BR><BR>James

    James:<BR><BR>What's important here is that ALL of the dimension build happen in the same IMPORT statement, as follows:<BR><BR>import database sample.basic dimensions <BR><b>from server text data_file 'genref' using server rules_file 'genref' suppress verification, <BR>from server text data_file 'level' using server rules_file 'level' suppress verification, <BR>from server text data_file 'time' using server rules_file 'time' suppress verification </b><BR>preserve all data on error append to 'C:\Hyperion\EAS\eas\client\dataload.err';<BR><BR>This is the only way that the suppression works.<BR>

  • Maxl path format in Linux like os

    Hi,
    I am trying to load a data file from remote linux like (aix) through maxl
    my maxl statement
    import database 'hidden'.'db' data from server text data_file 'servername//essbase//db_Lvl0.txt';  - I suspect path format is wrong
    servername is the name of the aix server which located remotely
    errors out as below
    syntax executed with warnings
    (1)syntax error near end of the statement
    I am wondering where is the mistake?
    Thanks.

    Issue has been resolved, followed the link - Oracle Essbase Technical Reference
    import database sample.basic data from data_file "'$ARBORPATH\\app\\sample\\basic\\calcdat.txt'"
    Example
    import database sample.basic data from data_file "'$ARBORPATH\\app\\sample\\basic\\calcdat.txt'" on error abort; import database sample.basic data from data_file '/data/calcdat.txt' using rules_file '/data/rulesfile.rul' on error write to '/logs/dimbuild.log';

  • Load Rules - MaXL

    Hi,
    I is it possible to run load rules from batch file? I have saved my rules file to xml and would like to run this xml or at least myrule.rul file from batch.
    Thank you very much
    lubos

    Hi,
    Yes you can use maxl to load data using a rules file, just create a maxl script and batch it up.
    For details on using the maxl command "Import Data", have a read of :- http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/frameset.htm?maxl_imp_data.htm
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Data Load MAXLs in ASO

    Hi All,
    Greetings of the day !!!!
    Want to understand the difference between "Add values create slice" and "override values create slice" used in data loading MAXLs
    Suppose we initialized buffer and loaded data in buffer then we can use following two MAXLs
    1)
    import database AsoSamp.Sample data
    from load_buffer with buffer_id 1
    add values create slice;
    2)
    import database AsoSamp.Sample data
    from load_buffer with buffer_id 1
    override values create slice;
    Q1
    What i am thinking logically is if i am again loading the data in the same intersections from which slice is created ADD VALUE will add it and override value will overwrite it .... e.g if 100 was present earlier and we are again loading 200 then ADD will make 300 and overwrite will result 200. Let me know if my understanding is correct
    Q2
    Why do we use "create slice" ? What is the use? Is it for better performance for data loading? Is it compulsary to merge the slices after dataloading??
    Cant we just use add value or override values if we dont want to create slice...
    Q3
    I saw two MAXLs for merging also ... one was Merge ALL DATA and other was MERGE incremental data ... Whats the diff ? In which case we use what?
    Pls help me in resolving my doubts... Thanks a lot !!!!

    Q1 - Your understanding is correct. The buffer commit specification determines how what is in the buffer is applied to what is already in the cube. Note that there are also buffer initialization specifications for 'sum' and 'use last' that apply only to data loaded to the buffer.
    Q2 - Load performance. Loading data to an ASO cube without 'create slice' takes time (per the DBAG) proportional to the amount of data already in the cube. So loading one value to a 100GB cube may take a very long time. Loading data to an ASO cube with 'create slice' takes time proportional to the amount of data being loaded - much faster in my example. There is no requirement to immediately merge slices, but it will have to be done to design / process aggregations or restructure the cube (in the case of restructure, it happens automatically IIRC). The extra slices are like extra cubes, so when you query Essbase now has to look at both the main cube and the slice. There is a statistic that tells you how much time Essbase spends querying slices vs querying the main cube, but no real guidance on what a 'good' or 'bad' number is! See http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/aggstor_runtime_stats.html.
    The other reason you might want to create a slice is that it's possible to overwrite (or even remove, by committing an empty buffer with the 'override incremental data' clause in the buffer commit specification) only the slice data without having to do physical or logical clears. So if you are continually updating current period data, for example, it might make sense to load that data to an incremental slice.
    Q3 - You can merge the incremental slices into the rest of the cube, or you can merge multiple incremental slices into one single incremental slice, but not into the rest of the cube. Honestly, I've only ever wanted to use the first option. I'm not really sure when or why you would want to do the second, although I'm sure it's in there for a reason.

  • Dropping a essbase cube member through Maxl Script

    Hi,
    Can anybody suggest, how I can delete the the member of a cube through MaxL Script.
    Is this achievable ??

    I think what you're trying to do (delete a member from a dimension) can be done in MaxL through a data load rule and an appropriate dimension load file.
    See: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_eashelp/dbdbstdb.htm for more information re "remove unspecified".
    Also see http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/imp_dims.htm for the MaxL statement "import dimensions".
    Lastly, see: http://www.network54.com/Forum/58296/thread/1225372045/Deleting+Members+within+a+Member+Name+in+the+outline+not+manually+but+automatically+- for a fairly indepth discussion of this issue.
    Regards,
    Cameron Lackpour

  • Auto refresh of data in Cube

    Hi,
    I created a cube and deployed with data, also viewed. I changed data in oracle table, from which the cube was prepared, but the change in the data did not appear in cube. Is there a property (auto refresh or auto update) associated with cube / App / database in EAS which can be turned on?
    Kindly advice.
    Thanks and regards,
    Veeranna Ronad.
    Edited by: Ronad on Feb 17, 2010 10:46 AM

    Can we connect to Oracle database using MaxL commands?^^^As Srinivas pointed out, you need to use the MaxL command "import" to load data into Essbase.
    See http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/maxl_imp_data.htm for more detail on how to do this. You'll see that it can load from SQL -- you will need to use a data load rule. See http://download.oracle.com/docs/cd/E12825_01/epm.111/eashelp/loading.htm and http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_dbag/ddlintro.htm for more information on data load rules.
    Importing a large table data on certain interval makes system and application very slow.^^^Do you have to reload all of the data? Can you just load the differences?
    How many records are you loading?
    Regards,
    Cameron Lackpour

  • Projects dropped from shared services when creating an essbase application

    When we try to create an essbase application via EAS - there is an error message Unable to createExternalUser. then when we log in to shared services - there are no projects available.
    This is for version 9.3.1.0

    Hi Cameron,
    many thanks for your answer.
    Well let me explain a little bit further:
    I created an own security module which manages the whole security in Essbase. I get the grants from a corporate system and then just apply them by some definitions natively in Essbase using filters etc.
    To make sure the grants on the server are exactly the same as the grants that get delivered to me, I export the complete security in Essbase using MaxL and import it to a relational DB. I then check whether there are any grants which shouldn't be there and vice versa.
    If now an admin user creates an application, he gets an additional application manager grant for this application. He does not loose his admin permissions.
    Now in my check this application manager grant pops up as this grant is not in the corporate system but created Essbase internally when a application is created.
    If I export the complete security this application manager grant is there.
    I would like to get rid of these errors in my check. Also it makes no sense that an admin user gets an Application Manager grant because he already has that permission as an admin user.
    I already searched the documentations but didn't find a setting to disable this behaviour of Essbase.
    Btw. Essbase version is 11.1.1.3.
    Maybe someone of you guys know if there is any chance to do this - if not, I have to find another solution.
    Thanks and kind regards,
    Thomas

  • Disable automatic Application Manager grant when creating an application

    Hi all,
    If an admin user (administrator privileges in Essbase directly - shared services not used) creates an application in Essbase, the user automatically gets an Application Manager grant for this application.
    This makes no sense in our environment and especially makes no sense as the user is already an administrator and has full access to Essbase.
    Is there any way to disbale this?
    Thanks and kind regards,
    Thomas

    Hi Cameron,
    many thanks for your answer.
    Well let me explain a little bit further:
    I created an own security module which manages the whole security in Essbase. I get the grants from a corporate system and then just apply them by some definitions natively in Essbase using filters etc.
    To make sure the grants on the server are exactly the same as the grants that get delivered to me, I export the complete security in Essbase using MaxL and import it to a relational DB. I then check whether there are any grants which shouldn't be there and vice versa.
    If now an admin user creates an application, he gets an additional application manager grant for this application. He does not loose his admin permissions.
    Now in my check this application manager grant pops up as this grant is not in the corporate system but created Essbase internally when a application is created.
    If I export the complete security this application manager grant is there.
    I would like to get rid of these errors in my check. Also it makes no sense that an admin user gets an Application Manager grant because he already has that permission as an admin user.
    I already searched the documentations but didn't find a setting to disable this behaviour of Essbase.
    Btw. Essbase version is 11.1.1.3.
    Maybe someone of you guys know if there is any chance to do this - if not, I have to find another solution.
    Thanks and kind regards,
    Thomas

Maybe you are looking for

  • Firefox Bookmarks now in bookmarks.html format on iMac desktop

    I have tried many different ways to get my old bookmarks into my iMac bookmarks and only managed to get them onto my desktop in a folder labeled "bookmarks.html" which opens as a webpage and is very wordy as it describes each bookmark. Any suggestion

  • Problem passing REF CURSOR to JAVA STORED PROCEDURE

    Hi, I've written a small Java class with a static method and imported that into Oracle 8i. The method expects a java.sql.ResultSet object as parameter. According to the documentation of Oracle, a REF CURSOR (cursor variable) maps to java.sql.ResultSe

  • Documents in icloud?

    How do we save documents in icloud?  Like Filemaker per exemple?

  • Web Service Request Collection/Complex Objects doesn't work

    I am unable to call a .net web service using Adobe LiveCycle Designer 8.0. My test web service accepts either a complex object or a collection of the same object. EX) [WebMethod] public string CostChange(CostChangeNotificationItem change1, CostChange

  • Lost photos in iPhoto library

    My Mac OS X 10.4.11 is owned by my sister.  After the home icon, it always said her name.  Today, I changed the the of the folder to Home.  After I did that, all the photos I had put into the Iphoto library are GONE!  How do I get them back and where