Execute a mapping externally (not from OWB)

Dear all
I was wondering how we could execute a deployed mapping either from PL/SQL or using another script.
Any ideas are welcome

Hi
search this forum for sqlplus_exec_template.sql for the suggested solutions.
I believe that there are two generally used methods
1) create a pl/sql procedure using sqlplus_exec_template.sql as template or just use the script as is
2) call the p_main function of the mapping in question.
Cheers
Ian

Similar Messages

  • Error while fetching data from OWB Client using External Table.

    Dear All,
    I am using Oracle Warehouse Builder 11g & Oracle 10gR2 as repository database on Windows 2000 Server.
    I facing some issue in fetching data from a Flat File using external table from OWB Client.
    I have perform all the steps without any error but when I try to view the data, I got the following error.
    ======================================
    RA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file expense_categories.csv in SOURCE_LOCATION not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    java.sql.SQLException: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file expense_categories.csv in SOURCE_LOCATION not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
         at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:774)
         at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:849)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1377)
         at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:386)
         at oracle.wh.ui.owbcommon.QueryResult.<init>(QueryResult.java:18)
         at oracle.wh.ui.owbcommon.dataviewer.relational.OracleQueryResult.<init>(OracleDVTableModel.java:48)
         at oracle.wh.ui.owbcommon.dataviewer.relational.OracleDVTableModel.doFetch(OracleDVTableModel.java:20)
         at oracle.wh.ui.owbcommon.dataviewer.RDVTableModel.fetch(RDVTableModel.java:46)
         at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerPanel$1.actionPerformed(BaseDataViewerPanel.java:218)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:282)
         at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerPanel.executeQuery(BaseDataViewerPanel.java:493)
         at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerEditor.init(BaseDataViewerEditor.java:116)
         at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerEditor.<init>(BaseDataViewerEditor.java:58)
         at oracle.wh.ui.owbcommon.dataviewer.relational.DataViewerEditor.<init>(DataViewerEditor.java:16)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at oracle.wh.ui.owbcommon.IdeUtils._tryLaunchEditorByClass(IdeUtils.java:1412)
         at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1349)
         at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1367)
         at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:869)
         at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:856)
         at oracle.wh.ui.console.commands.DataViewerCmd.performAction(DataViewerCmd.java:19)
         at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    ===========================
    In the error it is showing that file expense_categories.csv in SOURCE_LOCATION not found but I am 100% sure that file is very much there.
    Is anybody face the same issue?
    Do we need to configure something before loading data from a flat file from OWB Client?
    Any help would higly appreciable.
    Regards,
    Manmohan Sharma

    Hi Detlef / Gowtham,
    Now I am able to fetch data from flat files from OWB Server as well as OWB Client.
    One way I have achieved as suggested by you
    1) Creating location on the OWB Client
    2) Samples the files at client
    3) Created & Configured external table
    4) Copy all flat files on OWB Server
    5) Updated the location which I created at the client.
    Other way
    1) Creating location on the OWB Client
    2) Samples the files at client
    3) Created & Configured external table
    4) Copied flat files on the sever in same drive & directory . like if my all flat files are on C:\data at OWB Client then I copied flat file C:\data on the OWB Server. But this is feasible for Non-Windows.
    Hence my problem solved.
    Thanks a lot.
    Regards,
    Manmohan

  • How to change the 'Default operating mode' of a mapping on the repository and not from the client

    Hi everybody,
    I am using OWB 11.2.0.3 and under the mapping's configuration property, I have the necessity to change the Run time parameter "Default operating mode" to SET_BASED in almost all my mappings.
    Because I have 745 mappings in which the Default operating mode is different from SET_BASED, instead to open 745 times the 'Configure' and update manually the value, is there a way to update safely these values (with an oracle predefined script) directly on the repository ?
    I know that exists a view called CMPSTRINGPROPERTYVALUE_V based on a table called CMPSCOPrpClasses, but changing this table it's very complicated for me because contains only keys and then I don't know in which way is connected with all the other structures....
    If somebody knows a method more efficient to do these updates on the repository and not from OWB client I will appreciated it!
    Thanks in advance
    Alessandro

    Urgent... help!!! Thanks
    in short, my server log says transaction access mode is "read only", so my calling home.create() always triggers a transaction rollback. How to change the access mode to "read write"?
    Is possible to work out through one of the descriptor files? Or ini settings of the underlying pointbase database? Or any other way around?

  • Oracle warehouse builder error when I execute any mapping

    oracle warehouse builder error when I execute any mapping:
    I have installed OWB successfuly, It still no longer working correctly: it executed all the mappings, but it suddenly becomes incapable to execute any mappings in any project. It validates successfuly the mappings but in the execution it show the message :
    " ora-06550 : ligne1 colonne19..."
    please help me to correct this error.
    thank you.

    Make sure that there is no primary key or index on this table who exceed the limit.
    For more information see
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_wm2.htm#105677

  • Executing a mapping from sqlplus in OWB 904

    I have used the below syntax to execute OWB 902 mappings as below:
    sqlplus / <<*sql*
    Execute MAP_SOMETHING.MAIN();
    sql
    I deployed the same mapping with new version of OWB 904.. it did not work. What is new syntax to execute the mapping from sqlplus?

    From OWB 9.0.4 on, you must use the execution template to execute your mappings from sql. The template file, that has a brief doc section in its heading is:
    <OWB installation directory>/owb/rtp/sql/sqlplus_exec_template.sql
    Regards:
    Igor

  • Execute a mapping deployed with OWB 9.0.4 from SQL*Plus

    Hello,
    I could execute a mapping designed with OWB 9.0.3 from SQL*Plus with the next sentence:
    SQL> exec my_mapping.main;
    But now, with OWB 9.0.4, mappings are deployed as functions (in 9.0.3 were deployed as procedures) and they need parameters.
    Somebody know how I can execute deployed mappings with OWB 9.0.4 from SQL*Plus? I don't know the parameters I need to call a mapping.
    Thanks in advance,
    Pedro.

    Well, I've solved the problem with roles but
    I've executed the script called sqlplus_exec_template.sql and it fails at Stage 2 because the next sentence
    l_audit_execution_id := wb_rt_api_exec.open(l_task_type, l_task_name, l_location_name);
    returns me NULL.
    It is not clear the value that the variable called l_location_name have to stored. The script explain that this variable store the physical name of the
    location to which the task was deployed. I understand that this variable have to store the schema where the mapping was deployed. That's right?
    So I called the script in this manner:
    SQL> @sqlplus_exec_template OWBRUN904I OJBHT PLSQL MY_MAPPING "," "," ;
    where OWBRUN904I is the name of the Runtime Repository Schema, OJBHT is the
    schema where MY_MAPPING is deployed, PLSQL is the task type and MY_MAPPING is
    the name of the mapping I've designed.
    Can you tell me why the scripts fails?
    Regards,
    Pedro

  • OWB 10.1 error when execute a mapping from a view to a table

    Hi everyone,
    I have one mapping that is from a view to a target table, both are reside on the schema, it's a very simple mapping, just one to one, no transformation. Deployment is OK, but when I execute, it give me warning " ORA-942 table or view does not exist", however when I check my target table, the data seems to be loaded fine. Does anyone experience the same problem?

    Please check SCD Type 2 and ORA-00923: FROM keyword not found where expected

  • Can I execute a mapping from a database trigger ????

    Can anyone tell me if I can execute a mapping from a database trigger ? How ???
    Thanks in advance.----
    JEMD

    Hello,
    We are using the approach of scheduling predefined job heavily in our projects. It works fine.
    There are several points to mention:
    - scheduling / rescheduling algorithm must not lead to simultaneous session of the mapping run. Depending of content of the mappings/PF this could bring the real pain.
    - If there are several user sessions intensively interacting the table on which the scheduling trigger is created, scheduling / rescheduling algorithm must be written with care – users could lock or wait each other while updating job record.
    - Depending on intensity of such mapping runs additional care must be taken of OWB audit trail which will tend to grow.
    Depending on requirements trigger could call ordinal procedure for scheduling (if mapping run must be performed only if user commit change to the table), or procedure with autonomous_transaction pragma (if any touch of the table should fire the execution – don’t think this is a case)
    Sergey

  • Execute a mapping outside OWB

    Hello,
    I want to execute a mapping outside OWB. Therefore I want to use this code:
    DECLARE
    l_retval NUMBER;
    l_env WB_RT_MAPAUDIT.WB_RT_NAME_VALUES;
    BEGIN
    l_retval := mapping_name.MAIN(l_env);
    END;
    The problem I have now is that I don't know how to fill variable l_env.

    LS,
    Try this one from SQL*Plus (got this from André Deumers, Oracle NL):
    "set verify off
    set feed off
    set term on
    set serveroutput on
    WHENEVER SQLERROR CONTINUE NONE;
    accept mapping prompt "Please enter mapping name: "
    DECLARE
    RetVal NUMBER;
    P_ENV WB_RT_MAPAUDIT.WB_RT_NAME_VALUES;
    BEGIN
    -- Initialize Parameters
    p_env(1).param_name := 'MAX_NO_OF_ERRORS';
    p_env(1).param_value := '0';
    p_env(2).param_name := 'COMMIT_FREQUENCY';
    p_env(2).param_value := '999999';
    p_env(3).param_name := 'OPERATING_MODE';
    p_env(3).param_value := '1'; -- ROW_BASED
    p_env(4).param_name := 'BULK_SIZE';
    p_env(4).param_value := '999999';
    DBMS_Output.Put_Line('Procedure start: ' || to_char(sysdate, 'dd-mm-yyyy hh24:mi:ss'));
    FOR i IN 1..p_env.COUNT LOOP
    DBMS_Output.Put_Line(p_env(i).param_name || ' = ' || p_env(i).param_value);
    END LOOP;
    RetVal := &mapping..MAIN ( p_env );
    CASE WHEN RetVal = 0 THEN DBMS_Output.Put_Line('Result Successful');
    WHEN RetVal = 1 THEN DBMS_Output.Put_Line('Result Abort');
    WHEN RetVal = 2 THEN DBMS_Output.Put_Line('Result Error');
    ELSE DBMS_Output.Put_Line('Result Unknown?');
    END CASE;
    DBMS_Output.Put_Line('Procedure stop: ' || to_char(sysdate, 'dd-mm-yyyy hh24:mi:ss'));
    END;
    set verify on
    set feed on
    If you want to execute something like this from PL/SQL, so not necessarily from SQL*Plus, give us the question, I'll give you some source.
    Regards,
    André

  • How can I execute an external program from within a button's event handler?

    I am using Tomcat ApacheTomcat 6.0.16 with Netbeans 6.1 (with the latest JDK/J2EE)
    I need to execute external programs from an event handler for a button on a JSF page (the program is compiled, and extremely fast compared both to plain java and especially stored procedures written in SQL).
    I tried what I'd do in a standalone program (as shown in the appended code), but it didn't work. Instead I received text saying the program couldn't be found. This error message comes even if I try the Windows command "dir". I thought with 'dir' I'd at least get the contents of the current working directory. :-(
    I can probably get by with cgi on Apache's httpd server (or, I understand tomcat supports cgi, but I have yet to get that to work either), but whatever I do I need to be able to do it from within the button's event handler. And if I resort to cgi, I must be able to maintain session jumping from one server to the other and back.
    So, then, how can I do this?
    Thanks
    Ted
    NB: The programs that I need to run do NOT take input from the user. Rather, my code in the web application processes user selections from selection controls, and a couple field controls, sanitizes the inoputs and places clean, safe data in a MySQL database, and then the external program I need to run gets safe data from the database, does some heavy duty number crunching, and puts the output data into the database. They are well insulated from mischeif.
    NB: In the following array_function_test.pl was placed in the same folder as the web application's jsp pages, (and I'd tried WEB-INF - with the same result), and I DID see the file in the application's war file.
            try {
                java.lang.ProcessBuilder pn = new java.lang.ProcessBuilder("array_function_test.pl");
                //pn.directory(new java.io.File("K:\\work"));
                java.lang.Process pr = pn.start();
                java.io.BufferedInputStream bis = (java.io.BufferedInputStream)pr.getInputStream();
                String tmp = new String("");
                byte b[] = new byte[1000];
                int i = 0;
                while (i != -1) {
                    bis.read(b);
                    tmp += new String(b);
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + tmp);
            } catch (java.io.IOException ex) {
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + ex.getMessage());
            }

    Hi Fonsi!
    One way to execute an external program is to use the System Exec.vi. You find it in the functions pallet under Communication.
    /Thomas

  • Owb 11.2.0.3 changing the name of a mapping is not reflected in the process

    We're just in the phase of migrating from OWB 10.1 to 11.2.0.3.
    So far so good but of course there are some bugs in the latest version.
    One of the more annoying problems is the following.
    We could see a process flow with several mappings after the migration but the mapping names shown (business and physical) in the process flow could not be found in the list of mappings .
    To be sure this is an error (bug)
    - I created a flow from scratch with one mapping,
    - saved the flow and
    - went to the mappings and
    - there I changed the name of the mapping used in the flow.
    - I opened the flow again and there was still the old name, so it is very easy to forget/delete the link between real mapping names and the names used in the flow.
    Is this a known problem and if yes is there already a patch or do we have to wait for 11.2.0.4?

    Yes OWB 11gR2 is certified on database 10gR2.
    The OWB standalone client can be found here;
    http://blogs.oracle.com/warehousebuilder/entry/owb_11gr2_windows_64_bit
    or on OTN here;
    http://blogs.oracle.com/warehousebuilder/entry/owb_11gr2_windows_and_linux
    Cheers
    David

  • Mapping executes fine but does not produce any output

    I created a mapping to copy values from one table to another for a particular condition. I have data for thsi particular condition in the input table.
    The Mapping validated fine and was deployed successfully.
    The OWB Mapping is run from Unix.
    The mapping executes fine without any issues but it does practically nothing. The target table has no data.
    Need any more details on this? Please help.

    Generate the code at Mapping Editor and execute it manually. Probably you have to modify the where clause.

  • Is it possible to  downgrade ios 6 to 5.1.1(i upgrade my iphone 4s from 5.1.1 to 6 but map is not working )

    is it possible to  downgrade ios 6 to 5.1.1(i upgrade my iphone 4s from 5.1.1 to 6 but map is not working )

    best answer to your question I've ever seen is;
    Kappy Tampa, FL and Vancouver, BC
    Re: Downgrading     Oct 16, 2012 2:57 PM    (in response to nbabbit2013) 
    I'm sorry, but Apple does not provide a downgrade path for iOS. Because downgrading is unsupported by Apple we cannot discuss it on these forums, but you can use Google to find information on how to install an older version of iOS on any iDevice.

  • Boot Camp Assistant thinks I'm booting from an external (not the case!)

    OK, long story short, I had Vista installed via boot camp, I'm going back to XP now. Problems arose and Boot Camp refused to let me restore the partition in order to start over.
    Here's what I did. I completely wiped the three drives I have installed in the Mac Pro — Completely: zeroed them out. RAIDed the two 500GB drives together like I've always had them. The 250GB (which has been in the past, and will be again, my boot camp drive) is left blank for the time being. I installed 10.5 onto the RAID pair. No problems so far. The moment I got to my desktop after installation I open Boot Camp Assistant. I click continue and it gives me the message I got before:
    "*You cannot partition an external disk drive.*
    Restart your computer using your computer's internal startup disk."
    Awesome. I don't even have any external drives attached.
    Any idea why I'm getting this? I've been struggling for the last week trying to figure this out.
    Here's a shot of the message along with a system profiler window with my hard drive details:
    http://homepage.mac.com/ltcarter47/images/bootcampfrustrations.png
    Thanks for your insight,
    Sean

    I almost never use BootCamp Assistant and don't find it that useful.
    I will say that I would never, ever, RAID un-like drives and it seems you have Maxtor and Samsung for your RAID.
    I would only use Seagate if it was OEM, maybe, or a .11 new series.
    I assume you have 10.5.1+ and while I can't claim to have read even 10% or the threads in the Leopard forum, I can't recall hearing of the error you have with repair permissions, though I would always do so while booted from your boot drive, not from the DVD and 10.5.0 (I wasn't going to buy Leopard until it came out on a later version DVD, 10.5.0 is just "too early" for me).
    I always had to pull OS X system when I installed Vista x64.
    Not sure why, I don't think zeroing the drives was necessary to remove any and all partitions, though.

  • Execute SQL Task does not Update from a Date Variable Reliably

    I'm using a DateTime variable in SSIS 2008 that is used to set the SQLStatement property of an Execute SQL Task.
    "DELETE FROM Labor WHERE Week = '" + (DT_WSTR, 100) @[User::Week] + "'"
    Week is the next Sunday:
    DATEADD( "day", @[User::DaysTillSunday] , @[User::TheDayThatIsTwentyMinutesPrior] )
    DaysTillSunday:
    DATEPART( "dw", @[User::TheDayThatIsTwentyMinutesPrior] ) == 1 ? 0 : 8 - DATEPART( "dw", @[User::TheDayThatIsTwentyMinutesPrior] )
    TheDayThatIsTwentyMinutesPrior:
    (DT_DATE)(DT_DBDATE)DATEADD("minute",-20,GETDATE())
    The SSIS Package deletes the current week's data, reloads it with fresh data, then calculates the difference between the current week and last week.
    The problem is that randomly, instead of deleting the current week, it will delete the previous week.  This happens maybe 5-10% of the time.  At least it does until I rebuild the package and import it into SQL Server again.
    I'm guessing that the Execute SQL Task is not updating the value of the Week variable before it executes.  I started with the source type being a variable.  Then I decided to try Direct input and pass in the Week as a parameter (OLE DB Connection
    Type).  That didn't work either.
    Most recently I tried writing the Week variable to a table first, then having a sequence container with all the tasks second.  Slightly better but I still saw the date was wrong 2 times in about 90 executions.  I was hoping that writing the Week
    variable out to the database would force an update of any associated connections to it, but that didn't seem to work.
    Any ideas?  Is this a known issue, am I missing a setting?
    thanks,
    John

    John, computers either work all the time or have a bug. I suspect it is the latter.
    To find it [faster] you need to log what the resulting expression was used in the package.
    I am baffled how rebuilding a package would fix anything like setting a date.
    It might be even dependant on when you run the package.
    Why
    DATEADD("minute",-20,GETDATE())
    DATEADD( "day", -8 , GETDATE() )
    It must be enough to set the week (that appears to be a date) as above.
    Arthur
    MyBlog
    Twitter

Maybe you are looking for

  • Installation Issue with Adobe Reader 11.0.03.

    Hello, I am having issue getting Adobe Reader XI to install onto a machine and needing help resolving it. The machine itself meet and exceed the requirement for the installation. There was a previous version of it installed, but was remove via Group

  • How to dequeue a message from a queue

    I am able to Queue a request from a trigger. How do i dequeue this message. SELECT consumer_name, enq_txn_id, enq_time, enq_timestamp, user_data FROM AQ$PROCESSASSETS_Q; CONSUMER_NAME     ENQ_TXN_ID     ENQ_TIME     ENQ_TIMESTAMP     USER_DATA ASSET 

  • Startup problems

    My Powerbook G4 was running fine with no problems. Suddenly now when I go to turn it on, it will either be hung up on the grey screen with the spinning sprocket or it will stay on that screen for a minute or two and then eventually complete the start

  • Word and Excel applications for iPhone

    It is disappointing that the iPhone didn't come with word and excel-type applications. Any insights someone?

  • Photoshop Elements 9 will not print a photo & usually locks up

    I bought Photoshop Elements 9 threeyears ago when I upgraded to a Win 7 computer.  I have NEVER been able to print a photo!!! Program tells there is no printer then just locks up & closes.