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é

Similar Messages

  • Executing the mapping in OWB

    hi ...
    am new to OWB and stuck up in some issue.
    I have created a mapping and validated it .also created connections for the source and target .
    could you let me know how to run the mapping and check the status of the mapping whether its running or failed or succeeded
    i require the sequence of steps..
    thanks in advance for the help
    regards
    raj

    Hi Raj,
    OWB Mappings executed through Control Center Manager. Please open Control Center Manager, navigate to your mapping, deploy that and then execute.
    PS: Make sure you have created the location for the module where you created mapping.
    Thanks,
    G

  • Process flow failes when executing a mapping by error ......

    hi all,
    When we executes a mapping through owb normally it works fine.
    But the same when executes throgh a process flow it get falies with the f/w error.
    *"Set based mode not supported ORA-06512"*
    The operating mode is "set based fali over to row based"
    In the mapping we are doing some transforamtion and putting the data in a flat file.
    Please help in this reagrd.
    Regards
    ashok

    Hi,
    change in processflow configuration property OPERATING_MODE for this mapping to ROW_BASED or ROW_BASED_TARGET_ONLY
    Hope this helps!

  • 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

  • Error while Executing the mapping

    While I am executing the mapping this error is thrown by the server. It is big mapping and references many parent tables.
    ORA-12801: error signaled in parallel query server P001 ORA-01114: IO error writing block to file 201 (block # 523269) ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file OSD-04026: Invalid parameter passed. (OS 523275) ORA-01114: IO error writing block to file 201 (block # 523269) ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file OSD-04026: Invalid parameter passed. (OS 523275)
    Can you please provide the solution for this.
    Thanks in advance.

    This seems to be a DB server error, not an OWB issue. You should contact Oracle support.
    Regards:
    Igor

  • Ora -06550 error while executing the mapping

    Hi,
    I am using owb client 11.2.0.3 . I have mapping map_emlap_src in this mapping i have import tables from different scehema and i have done one to one mapping on both the table .
    While executing the mapping i got the following error .
    ORA-06550: line 1, column 1082:
    PLS-00302: component 'MAP_EMLAP_SRC' must be declared
    ORA-06550: line 1, column 1062:
    PL/SQL: Statement ignored

    grant execute on owner_name.MAP_EMLAP_SRC to user_name;

  • How to execute a mapping based on an event

    Hi
    I am on OWB 10.2.0.3. and Oracle 10.2.0.2. I have a mapping which is fine, deploys well, I can execute using the control manager.
    I also created a schedule module in OWB, created a schedule for a specific date and time and also an interval, configured the mapping to this schedule. The mapping gets executed successfully at the scheduled time.
    The requirement is this mapping needs to be executed by an external process (oracle but a different application in a different machine). The team owning this process is ready to insert a record in a table. Which I want to sense and execute this mapping.
    I already have created a procedure so that this mapping can also be run from pl/sql. I can create an after-insert trigger in this table so call this procedure, but that will make the whole think synchronous and the external process will have to wait for this mapping to complete to proceed further which is not acceptable by them.
    Is there a way I can check for the record in this table and exec the mapping from OWB?
    Can somebody please help and provide me pointers how I can schedule a mapping based on an event (insertion of the record) without (preferably) or with Oracle Workflow.
    Thanks a lot in advance!
    Maruthi

    Thanks Detlef,
    The problem I have is the trigger will make it actually synchronous with the process that inserts the record in the table.
    Even if I define the trigger as AUTONOMIUS_TRANSACTION, both the process will not parellel. setting this I can have commits and rollbacks in triggers but they will be synchronous. I want this mapping to run asynchronously so that the main process inserts the record and continues with the rest of the process while the mapping can be executed independently.
    For this reason I am looking for something which will allow me to do this without a trigger on the table.
    As mentioned in your refereed post, I can use CDC, but not sure how good is CDC and will this be an overkill to implement and use CDC for this purpose. Any simpler solution available?
    Any inputs please?
    Thanks once again!
    Regards,
    Maruthi

  • Message Mapping outside BPM

    I often see a point from XI-Legends that a Message Mapping should be executed out side the BPM and that will make the XI performance good.
    How to do a Message Mapping outside BPM? What does it mean?
    Any Blog that narrates the above situation?
    Thanks.

    Data Types
    Source/Sender Data Format ---     DT_Sender File     
    Target/Receiver Data Format --     DT_Receiver
    Message Types
    Sender Message Type -  MT_SenderFile
    Receiver Message Type - MT_ReceiverFile
    Message Interface
    MI_OB_Sender(Async, Outbound)            MI_IB_Receiver(Asynch,Inbound)
    AI_Sender(Async, Abstract)                    AI_Receiver(Async,Abstract)
    So
    if the mappaing is done between
    MI_OB_Sender       To   AI_Receiver           (Its Before BPM)
    AI_Sender              To   MI_IB_Receiver      (Its After BPM)
    AI_Sender              to  AI_Receiver            (Its inside BPM)
    Whether my understanding is correct? Thanks for your patience.

  • No transfer of data executing a mapping

    hi guys,
    plz help me out! i try to transfer a simple filled table from the design schema to the target schema. there are no errors or warnings deploying the mapping. NOW: every time i execute the mapping it says that the mapping was completed successfully, BUT the problem is it doesnt insert the data from the source table to the target table. the target table is empty.
    my question:
    - do i have to change/set the system privileges to sysdba or sysoper for the runtime schemas to solve this problem ?
    - is it maybe a connection problem between the dw and source module ?
    - what could it else be ?
    appreciate any idea, thx!
    greetings
    s8472

    i think i know now what is the problem:
    althought the owb user's guide tells on page 3-5, that a connector is automatically created as you place sources on the mapping canvas, the missing connector was the problem of the "no transfer" of the data.
    so i created a connector from the oracle_dw-module_location to the oracle_source-module_location. after that dont forget to deploy the connection inside of the deployment manager. now the mapping executes and transfer the data completely.
    greetings
    s8472

  • 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

  • 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

  • Error while deploying a mapping in OWB.

    Hi All,
    OWB configuration is as follows:
    Oracle9i Warehouse Builder Client: 9.2.0.2.8
    Oracle9i Warehouse Builder Client: 9.2.0.2.0
    OS: Windows XP Professional.
    Following is error message displayed when i tried to deploy a mapping thru OWB Client.
    RTC-5260 Failed to connect to runtime platform. Please check you have provided the correct host,user, password, service_name.
    RTC-5324" This Runtime Access user is not associated with the specified runtime repository. Please use the OWB Runtime Assistant to ressolve this problem.
    Steps followed are as follows:
    1> Defined Source Module, Added Connection & Location information.
    Dblink created to point to source schema. Tables imported from the source schema.
    2> Defined Target Module, Added Connection & Location information. Dblink created to point to target schema. Tables imported from the target schema.
    3> Created a simple mapping which involves a source & target table, Aggregator operator.
    4> Validated & Generated the mapping.
    5> Created Runtime Repository Connections.
    6> Selected the Repository Connection at time of Deploy entered the password.
    Am i missing few steps for deployment of the mapping?
    The error message RTC-5260 suggests that
    This Runtime Access user is not associated with the specified runtime repository. How this can be done?
    Thanks in Advance.
    Regards,
    Vidyanand

    Hi Vidyanand,
    Did you create the runtime access user using the runtime assistant? Did you select the correct runtime repository (if you have more) to associate your runtime access user with?
    Note that there are 4 database roles being created when you create a runtime repository owner:
    - OWB_A_<runtime repository owner>
    - OWB_D_<runtime repository owner>
    - OWB_R_<runtime repository owner>
    - OWB_U_<runtime repository owner>
    If you would grant those roles to a user, then that user becomes an access user for the user with username <runtime repository owner>.
    Note that you can also use the runtime repository credentials to connect to the runtime repository for deployment purposes, but you may not want that because of security concerns.
    Thanks,
    Mark.

  • Error while executing a mapping

    Hi All
    I'm getting the following error message when i'm executing a mapping :
    ORA-12801: error signaled in parallel query server P013 ORA-01722: invalid number
    Any advice or help is greatly appreciated.
    Thanks

    Thanks Nawneet
    I got the error from the runtime browser where you can view the errors, and i dont see any debug options in there except the error message.
    Thanks again

  • Mapping in OWB with primary key and foreign key relationship

    Hi all,
    I am new to this datawarehousing field. I have just started my career. I have to now create a mapping in owb where a table has a field which is a primary key of another table in the same staging area. If you guys could help me out with the a method it can be created that would be very helpful to me.
    I thought of 2 ideas,
    1. If I can use a look up, but then I am not sure if i can use a lookup for primary key, foreign key relationship. If I can use also, I do not know how to use that.
    2. What if I can directly take that the first table and link the primary key of that table to the second table which uses that primary key of the first table as one of its fields.
    I do not know how feasible these methods are. Please guys help me out.
    Thanks in advance.

    I have a similar case where table a and table b having relation but table a got inserted with data and table b is empty so there no values for foriegn key column in table b to realte with table a.
    Now i want to load table b foriegn key with primary key column values of table a.
    how can we do this in owb
    thanks
    kumar

Maybe you are looking for