MaxL import statement w/ rules

How do you tell MaxL to look on the server for the rules file (without specifying a full path)?Harold

Try using the following syntax:import database DBS_NAME data from data_file DATA_FILE_NAME using server rules_file RULES_FILE_NAME on error write to ERROR_FILE_NAME;Shane EckertThinkFast Consulting, Inc.

Similar Messages

  • MAXL import statement with ASO

    I am attempting to write a MAXL script to import data using a load rule and want this to subtract from any existing data already stored in the database. I am using a load buffer and my syntax is as follows:
    alter database App.DB initialize load_buffer with buffer_id 1;
    import database App.DB data from data_file 'RnBF2B1.txt' using server rules_file 'Rev2B.rul' to load_buffer with buffer_id 1 on error write to 'Rev2B.err';
    import database App.DB data from load_buffer with buffer_id 1 subtract values;
    I am getting the error :
    essmsh error: Parse error near subtract
    Any ideas?

    I am using Essbase 9.3.1
    If I go to the command prompt and type line by line, I do not get an error but if I put it in a mshs file, it appears like there is an extra space before the word subtract and that's where I have the error. I have checked and there really is only one space.
    This is what my command file looks like
    MAXL> import database App.db data from load_buffer with buffer_id 1 subtract values;
    essmsh errro: Parse error near subtract
    Do you think MAXL is puttin in an extra space or something? I feel like my code is haunted by a ghost.
    Edited by: Jeanette R. on Aug 2, 2011 1:42 PM

  • 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

  • MAXL Import data statement error

    Can someone assist me in the maxl import data statement.
    In the import data statement "import database App.DB data from data_file "\\servername\\folder1\\folder1\\data.txt";
    The error I get is trying to specify the syntax for the path of the server. Does someone have an example of the import statement syntax that is referencing the data file from a server?
    Thanks

    Have you tried something like :-
    import database App.Db data from text data_file "\\\\servername\\sharename\\directory\\datafile.txt" using server rules_file "dataload" on error write to "dataerrors.err";
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Maxl Import Data Error

    I am getting the following error when i try to do import of Data into Database using MAXL.Can you please let me know what i am doing wrong.I am trying to incorporate this into a script.
    MAXL> import database 'HQFPA'.'HQFPA' data from local text data_file 'E:\\Hyperion\\AnalyticServices\\app\\HQFPA_Level0.txt';
    ERROR - 1242020 - (1) Syntax error near end of statement.
    importing Databases for HQFPA.HQSLP
    MAXL> import database 'HQFPA'.'HQSLP' data from local text data_file 'E:\\Hyperion\\AnalyticServices\\app\\HQSLP_Level0.txt';
    ERROR - 1242020 - (1) Syntax error near end of statement.
    Any help would be greatly appreciated.
    Thanks,
    Chandra

    Chandra,
    There's nothing that I can see wrong with your syntax. For giggles, I wrote an import statement against sample basic on my laptop (no load rule, just like yours) and stuck it into a three line MaxL script (login, import, exit):
    import database 'sample'.'basic' data from local data_file 'c:\\hyperion\\essbase\\app\\sample\\basic\\calcdat.txt' on error abort ;
    It works.
    BTW, this also works:
    import database sample.basic data from local data_file 'c:\hyperion\essbase\app\sample\basic\calcdat.txt' on error abort ;
    Isn't MaxL neat? :)
    Are you sure that your pathing is correct?
    Regards,
    Cameron Lackpour
    Edited by: CL on Dec 5, 2008 12:47 PM
    BTW, that first import statement has a double backslash between basic and calcdat but it doesn't show up after it's posted yet it is there when I edited it. It must be something to do with the way it gets wrapped in my browser.
    Edited by: CL on Dec 5, 2008 12:51 PM
    This also works (added text property to data_file):
    import database sample.basic data from local text data_file 'c:\hyperion\essbase\app\sample\basic\calcdat.txt' on error abort ;

  • Maxl import on error write to error

    I created a Maxl import data script to load data using SQL. The execution works when the on error is set to abort, however, when I set the on error to write or append I receive a syntax error message.
    I set the path in script editor as on error write to 'c:\\hyperion\dataload.err' but it appears in the MaxL statement window as on error write to $outfile_sree1.
    Does anyone know what might cause this error?
    Edited by: user10615431 on Dec 30, 2008 7:26 AM

    below is the Maxl script I use to import data into one of our databases. I do not use a double backslash in the file path.
    Good Luck,
    Scot
    /*** Login to essbase server ***/
    /*** login $1 $2 on $3; ***/
    login 'userid' 'password' on 'Server';
    /*** Set output file to spool all error messages only ***/
    spool stdout on to 'D:\Hyperion\Automation\Logs\GAAPPlan_Yearly_Load_Essbase.LOG';
    spool stderr on to 'D:\Hyperion\Automation\Errors\GAAPPlan_Yearly_Load_Essbase.ERR';
    /*** Clear data in GAAPPlan for the current year ***/
    execute calculation 'GAAPPlan'.'GAAPPlan'.'ClrACrYr';
    /*** Import data from the FACT_GAAPPlan_YEARLY table using a load rule ***/
    import database 'GAAPPlan'.'GAAPPlan' data connect as 'SQLUSERID' identified by 'SQLUSERID_Password' using server rules_file 'LdACrYr.rul' on error write to 'D:\Hyperion\Automation\Logs\GAAPPlan_Yearly_DataLoad_Essbase.log';
    /*** Calculate data in GAAPPlan for the rolling month ***/
    execute calculation 'GAAPPlan'.'GAAPPlan'.'ClcACrYr';
    spool off;
    logout;
    exit;

  • Import Statement - Which is Better ???

    Which import statement is better? Are there any performance advantages of calling the ones you need explicitly instead of using the shorthand (.*)?
    import java.util.*
    or
    import java.util.Vector;
    import java.util.TreeMap;

    there is no runtime performance difference. There could be a difference in compliation time if you use wildcards, but even that difference would probably be insignificant (plus, is compile time usually a concern in java?). The main advantage to importing only the classes you need, as the previous poster pointed out, is to reduce compilation ambiguities (e.g. does 'Date' refer to java.sql.Date or java.util.Date). For example, a recent poster just reported a problem where he imported java.beans.* and java.sql.* and, after upgrading to 1.4, none of his code compiles because both packages now have a Statement class, which causes ambiguities. As a general rule, it is best to import only the classes you need.

  • Import statement in .java files and .jsp files

    Guys I have few mysteries about this import statement.
    Please correct me if I am wrong.
    1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
    BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import the class I want to use.That is i have to say
    <%@page import="one"%>
    and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder.(Note that My.class is created in a folder different from c:\ClassFolder )
    But I am wondering why was there no need for me to import one.class in two.java.
    (Note I am using JDeveloper and Apache server)
    Please help.
    In this case the pSo I am wondering in JSP why it doesn't take the class I am looking for from the classpath .
    Help.

    You have to understand Java scoping rules. In the 1st scenario with the two Java files I am guessing neither one of them begins with a package statement. This means that they belong to the default package. When you compile the compiler uses the classpath to resolve method calls looking in the default package since there was no import statement specified in two.java. JSP is a little different. Now I just read this here in these forums a couple of days ago. Since the classfiles generated from the JSP files are not in the CLASSPATH they are loaded by a different classloader. This is why you have to import all references to all classes in the default package.

  • How can i append the variable to filename in import statement?

    how can i append variable(substitution variable) to file name in import command for maxL?
    example : For suppose there is a file like "dataload.txt" and a variable like cur_month(august).How can i rename the file like daload_august in import statement.
    Edited by: 788996 on Aug 22, 2010 11:18 PM

    Are you saying you want to use an OS level environment variable in a MaxL statement to substitute for an entire file name? I am going to illustrate Windows, but do it your own way in *nix if you want.
    YourCallingCode.cmd
    REM Note the \\ and then the \\, you had \\ and \
    SET curmon=c:\\ABC\\datafile_21_AUG.txt 
    REM Call MaxL with a paramenter
    startMaxL.cmd DoItForTheCurrentMonth.msh %curmon%DoItForTheCurrentMonth.msh
    login blah blah for blah ;
    import database appname.dbname data from local text data_file $curmon using server rules_file "rulefile"
         on error abort ;The trick is to change whatever's in % and % and replace it with a $ in the MaxL script.
    I gave a presentation last year on MaxL at ODTUG Kaleidoscope. If you go to http://www.odtug.com, then Tech Resources, then Essbase, then search on my name, you'll find "Master Essbase with MaxL Automation". More than you could ever want to know about MaxL, variables (parameter, environment, and explicitly declared), scripting, etc., etc., are all there for the taking. If you're not already a member, you'll have to join, but an associate membership is free. You can then download my presentation and all of the others. It is a treasure chest of technical tips and knowledge.
    Yes, I am a fan a member of the Hyperion SIG, so I am ever so slightly biased. Regardless, it is good information, for free.
    Regards,
    Cameron Lackpour
    Edited by: CL on Aug 24, 2010 5:33 AM
    If you want to substitute part of the data file name, you can do that too:
    set curmon=21_AUG
    Your MaxL statement would look like:
    import database appname.dbname data from local text data_file "c:\\ABC\\datafile_$curmon.txt" using server rules_file "rulefile"
         on error abort ;

  • Import statement question

    what's the difference between
    import java.util.Vector;
    and
    import java.util.*;
    is there any difference in bytecode generated? or time takes to compile?
    what's the best practice?

    Yes there is a best practice, it's the one you mentioned. Use the more specific import statement. If you're only using one or two classes from a package, explicitly name them in the import statements. That way somebody else reading your code (which includes yourself, six months later) can immediately get a better understanding of your code.
    If this rule is followed, and you see this as the first line of a source file:
    import java.util.StringTokenizer;
    then you know the StringTokenizer is being used. But if you saw this:
    import java.util.*;
    you wouldn't know which one is being used until you're deep in the code.
    Knowing right away whether a class is tokening a string, versus say using collections, makes it a lot easier to read.
    You should only use the whole-package include if you're importing a really big part of the package. For example:
    import java.awt.*;
    is probably OK because it's relatively unlikely a person will use only a couple classes from that package.

  • Import statement *not* required?

    Can someone explain this to me? I was following along a
    simple AS3 example (in the design video workshop) where a "Power
    Button" has some MouseEven CLICK event handling applied to it with
    a trace statement as the resulting handled function. Really simple
    basic example. The import statement is import
    flash.events.MouseEvent.
    How come removing the import statement does not produce an
    error?
    Reference:
    import flash.events.MouseEvent;
    myButton.addEventListener(MouseEvent.CLICK, myButtonClicked);
    function myButtonClicked(event:MouseEvent):void {
    trace('do Something');
    }

    midimidi,
    > So to be clear...if the AS is on the main timeline,
    import statements
    > are not needed, and if the AS is external and imported,
    import
    > statements are needed.
    That's a general rule of thumb, but not 100% applicable.
    > Are there any other exceptions to that, or does that go
    for all AS3
    > classes?
    There are exceptions, and the easiest way to find them is to
    leave out
    your import statements and plug away ... sooner or later,
    you'll get a
    compiler error, and then you'll know. :)
    >> It did strike me *** odd though, an imported .as
    file uses the same
    >> publish settings as code on the timeline. So why
    treat them differently?
    FLA files have publish settings, but AS files don't. They're
    just text
    files. I hear what you're saying ... they end up getting
    compiled along
    with / into the some FLA anyway -- and that FLA does have
    classpaths
    listed -- but those same AS files might be compiled in Flex
    Builder 2 or
    some 3rd party compiler. It would probably make good sense to
    require the
    import statement for inline FLA code, but not everyone is a
    hardcore
    programmer, and Adobe knows it. Nothing is *hurt* by using
    import in FLAs,
    but for folks who just want to do light programming, the
    convenience of not
    having to use it is nice.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • MAXL Import Database (and export data?)

    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:
    Have a separate SSIS package use the same SQL to dump the data out of the ERP database into a flat file.  The downside to this is that I'm using subvars from Essbase that don't exist in SQL.  So I'd have to write the SQL in a different way potentially causing discrepancies.
    A separate Data Export of what was loaded.  The downside here is that it doesn't have the errors that never made it in.
    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?
    Thanks-
    Cameron McClurg

    The SQL run via the load rule understands my subvars.  The load rule SQL looks like this:
    select...
    WHERE
      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:
    WHERE
      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?
    Thanks-
    Cameron

  • Timeline Import Statements

    I have a bunch of MovieClip Symbols in Library.  They all need to import the same classes for timeline code.  I don't want to add the import statements to every MovieClip's timeline.  I can't add import statements to base-class & get access from MovieClip's timeline.
    What do I do?

    It sounds like Inheritance doesn't work like that.  Imports added in the base-class ( super ) aren't available to the child class.  I've tried it.
    For example, importing TweenLite in the base-class, will not allow you to use TweenLite from the child-class or it's timeline.  I completely understand this from the OOP perspective, but am hoping for some workaround that either bends the rule, or is another easy approach.
    I thought addFrameScript might be a method that allows you to execute arbitrary code on any particular frame ( such as imports ), but it doesn't seem to work in that way.  It seems more like a onFrame callback.

  • Import stats running more than 20 hrs

    All,
    Version : 11.2.0.3 DB size : 1.5T
    I'm trying to import the statistics from test to prod to avoid stats collection timing and reduce CPU usage. But the import query running more than 20hrs. Looks like something wrong.I don't see object lock also.Can anyone guide where I have to look ?
    BEGIN dbms_stats.import_schema_stats(ownname => 'standadm' , stattab => 'standadm_stats'); END;
    Thanks

    Hi,
    Check Wait event of the session , refer alert log for any clue , Check for free space
    Try to Flush Shared_pool .
    Modify below query by passing import stats session sid or sql_text
    col sql_text for a80
    set pages 200
    set line 900
    col PROGRAM for a20
    col MACHINE for a20
    col CPU 9999999999
    alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
    col event for a40
    select *
    from (select /*+ rule */
    sa.sql_id,
    sa.CPU_TIME "CPU",
    s.sid "SID",
    s.serial# "SERIAL",
    s.program "PROGRAM",
    s.machine "MACHINE",
    sa.SQL_TEXT "SQL_TEXT",
    vp.spid,
    sw.event,
    s.logon_time,
    s.last_call_et / 60,
    s.username,
    s.status
    from v$sqlarea sa, v$session s, v$process vp, v$session_wait sw
    where sa.address = s.sql_address
    and sw.sid = s.sid
    and s.paddr = vp.addr
    order by CPU_TIME desc)
    where rownum < 10;
    Thanks,
    Ajay More
    http://moreajays.blogspot.com

  • Filename in import statement

    Hi srinivas bobbala,
    Thank you for your response.But I think my quesition was not clear.My ques... is for suppose there is one datafile for importing like.. "datafile_21" Here my intention is it takes file from datafile_21 only but it appears in import statement like datafile_21<<curmon>>.
    import database sample.sample data from data_file "c:\\ABC\datafile_21_AUG.txt" using server rules_file datafile on error abort;
    In this it takes datafile from datafile_21.But it appears like datafile_21_AUG in import statement.This AUG coming from batch file.
    Essmsh c:\\ABC\loadmxl.mxl %curmon%

    No it is not possible.
    I assume the data file "datafile_21" is first renamed to datafile_21_${CurrMth} in the batchscript.
    After that this data file *datafile_21_${CurrMth}* is pointed in the import statement.
    In the logs you will see this file as datafile_21_Aug.

Maybe you are looking for

  • How do i share files from my pc to my mac

    I need to know how to get a pic off my pc and transfer it to my mac wirelessly. I was trying to sell something online using my mac, and the pic i needed was on my pc. I tried to "share it" but was not able to get into my pc. Any suggestions?

  • The feature you are trying to use is on a network resource that is unavailable

    I just had to do an automatic upgrade of quicktime and now Itunes won't start at all. I tried to uninstall Itunes and it asked if I wanted to repair, so I said yes, then started to get the dreaded, "The feature you are trying to use is on a network r

  • Lightroom won't open Windows Explorer

    I'm running the current version of Lightroom. For a while now, it hasn't been opening Windows Explorer after I do an export (even though I have it set to do so), but that didn't bother me much so I let it go. But just now I wanted to view one of my p

  • Sql*loader and relate tables

    I have a file formated like the following: 111|1,2,3| 222|7,8| Oracle relate table looks like: tab1 (id1 number, id2 number) Can sql*loader handle this kind of data? I should have 5 records in tab1 once the load is finished. tab1 should have: 111,1 1

  • AE network connection out of order - "timelimit over"

    My Airport Express signal suddenly stopped shining. The network assistant indicates "timelimit over" ("zeitlimit überschritten" in german): What "timelimit" is meant and how to restore the wireless network connection? Note that connection via etherne