Post Mapping Process Execution

Hi,
I have a post mapping process for a mapping.
The post mapping process gets executed even when the mapping results in an error.
I wanted to know is there any parameter that needs to be set so that post mapping process would be executed only on successful execution of mapping.
The parameter "Post Mapping Process Run Condition" is set to On Success.
Also my Mapping performs Set based Operation
Thanx in advance,
Sourabh

Hello Kishan,
The only way to archieve this currently is to create a super-procedure that calls all your stored procedures in sequence, and use the super-procedure with the post mapping operator.
Regards, Hans Henrik

Similar Messages

  • Post-mapping process error

    I have built all of my process in v9.0.2.62.3 except for once the row is loaded into my staging table, I want to delete this row from the source. I was trying to use the post-mapping process to call a procedure that would perform the deletion. However, I can not get the post-mapping process to work.
    The manual states to add a post-mapping process operator to a mapping:
    Drop a Post-Mapping Process operator onto the Mapping Editor canvas.
    Select the appropriate procedure from the selection list. This were I select a procedure called drop_ind with one input parameter, v_ind_id, of type number.
    Connect the output attribute of a source operator to the INOUTGRP1 of the Post-Mapping Process operator.
    This is where things start to go wrong with the manual. There is no INOUTGRP1, but only an INPUTS. If I try and attach the target column to the INPUTS, I get an API8009 cannot add attributes to POSTMAPPING INPUTS error. So I attach my target column directly to the input parameter
    Rename the operator:
    This goes well enough.
    Then I try and validate, and I get the following message wehn I try to generate the mapping :
    Code cannot be generated.
    Specify another operating mode or see validation messages for details.
    When I validate I get :VLD-2451 Illegal connection to POSTMAPPING. details = Illegal connection to POSTMAPPING.
    Obviously, I am doing something wrong, but what?

    Matthew,
    First a question, what are you trying to add to the post mapping process? The ID of the single row that is processed?
    In that case, you will have to rethink the strategy. What happens in a post map process (and the rest of the map) is the following:
    1) execute any pre mapping processes
    2) execute the main body of the mapping (this is you diagram excluding pre and post mapping processes)
    3) execute the post mapping process
    This means that the post mapping process will be run whenever the rest of the mapping is complete.
    So to do what you want, you can use the post mapping process but you would add a marker to every inserted record and then in the post map procedure delete all the ones that have this marker in the target from the source.
    In that case you would need any parameters from your map into the procedure and you should be all set.
    Hope this helps,
    Jean-Pierre

  • Multiple POST-MAPPING Processes Code Generation BUG

    We are testing OWB 10gR2, and we were very happy to see that there is option to include more than one postmapping operator.
    The idea is to create mapping with two post-mapping operators and that:
    - one procedure is executed in case of 'Post-Mapping Process Run Condition' = ON ERROR
    - and other procedure in case of 'Post-Mapping Process Run Condition' = ON SUCCESS.
    But, after implementation of this case, we were dissapointed. We discover that neither procedure is executed.. ?!?!
    After analyzing generated code in 'finalize' method there is code like this:
    IF NOT get_abort THEN
    IF get_abort THEN
         BEGIN
    As you can see this condition will never bee true ?!?
    Doe's anyone have same problem?

    1) If you have somehow got multiple post-mappings working, I would consider that to be buggy behaviour that you cannot depend on for future releases or upgrades. As such, building a solution that depends on this has risk.
    2) You could always build a user-defined custom transformation that takes a list of tables to truncate and does so. Something like (untested, uncompiled, seat-of-the-pants written right here example to get you started):
    create or replace procedure trunc_tables(tablist varchar2)
    is
    local_tablist varchar2(2000) := tablist;
    this_Table varchar2(30);
    nextindex number := 1;
    begin
    nextindex := instr(local_tablist,',');
    while nextindex != 0 loop
    this_table := substr(local_tablist,1,nextindex-1);
    execute immediate 'truncate table '||this_Table;
    local_tablist := substr(local_tablist,nextindex+1);
    nextindex := instr(local_tablist,',');
    end loop;
    -- if no trailing semicolon there is still one table left
    if length(local_tablist) > 0 then
    execute immediate 'truncate table '||local_tablist;
    end if;
    end;
    You could then reference this in your post-mapping procedure with a call to trunc_Tables('table1,table2,table3'), and could re-use this code across all mapping that need it.
    Of course, if you have a lot of mapping-specific stuff to do then you might need to build custom transformations for each mapping that need to do different things as part of their post-process.
    Mike

  • POST MAPPING TO ACCESS RUN TIME  REPO

    Hi all,
    In my mapping , I have a post mapping process wherein, I want to identify the execution status of the mapping wherein the mapping name is passed as a parameter to the following query
    SELECT
    C.RTA_STATUS,     C.RTA_SELECT
    FROM ALL_RT_AUDIT_MAP_RUNS A ,WB_RT_AUDIT C
    WHERE A.MAP_NAME=v_mapping_name
    AND A.MAP_RUN_ID = (SELECT MAX (B.MAP_RUN_ID) FROM ALL_RT_AUDIT_MAP_RUNS B WHERE B.MAP_NAME=v_mapping_name) and A.EXECUTION_AUDIT_ID = C.RTE_ID
    But I am not able to get the result in to my variables..This is very urgent can anybody please help me..
    Thanks in Advance.
    Thanks & Regards
    Azgar

    Sumana, the post-map process will run no matter what, so you can just test the current status to determine what to do.
    For example, I have a standard post-mapping procedure that logs execution details to an audit schema that centralizes collection of execution stats for all processes run in our warehouse. It goes something like this:
    procedure finalize (p_process_id in number,
    p_process_name in varchar2)
    is
    l_status varchar2(20);
    l_numread number := 0;
    l_numInserted number := 0;
    l_numUpdated number := 0;
    l_numMerged number := 0;
    l_owb_audit_id number := 0;
    l_owb_status number := 0;
    sqlStmt varchar2(2000) :=
    'begin '||
    ' :1 := '||p_process_name||'.get_selected; '||
    ' :2 := '||p_process_name||'.get_inserted; '||
    ' :3 := '||p_process_name||'.get_updated; '||
    ' :4 := '||p_process_name||'.get_merged; '||
    ' :5 := '||p_process_name||'.get_runtime_audit_id; '||
    ' :6 := '||p_process_name||'.get_status; '||
    ' end;';
    begin
    -- we use dynamic SQL to return required audit field values.
    -- This allows us to alter which values we need at a later date
    -- without impacting the deployed mappings.
    -- M.B.
    execute immediate sqlStmt
    using out l_numread, out l_numInserted, out l_numUpdated,
    out l_numMerged, out l_owb_audit_id, out l_owb_status;
    -- map OWB status values to our internal codes.
    if l_owb_status = 2 then
    l_status := 'ERROR';
    elsif l_owb_status = 1 then
    l_status := 'WARNING';
    else
    l_status := 'SUCCESS';
    end if;
    -- and end the process in the audit tables
    erscntl_audit_log_pkg.process_end(p_process_id,
    1,
    l_status,
    null,
    l_numRead,
    null,
    l_numInserted,
    l_numUpdated,
    l_numMerged,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    l_owb_audit_id);
    end;
    You can see where I am translating the status for my purposes, but you could use this to test the status instead.
    the process_name input variable is established by a standard constant in our mappings which is set with a value of get_model_name so that a change to a mapping name is automatically updated internally in the call to the pre- and post-mapping procedures;
    Cheers,
    Mike

  • Problems with pre-mapping process operator in owb 9i

    Hi,
    I was trying to use the pre-mapping process operator in owb 9i. Problem is that the manual does not specify how the inputs need to be connected to this operator.
    Following is what I went through -
    I created a mapping table operator and a mapping dimension operator and connected these two. Then i created a pre-mapping process operator selecting the LTRIM function. Further I connected one of the table attributes to this pre-mapping operator as input and connected the output of this pre-mapping operator to the appropriate dimension operator attribute.
    On performing Validate, following error message was flashed -
    VLD-2451 : Illegal connection to pre-mapping process operator
    I am trying to learn how to use OWB 9i from the manual. So my interpretation of the use of the pre-mapping process operator may be wrong.
    In any case kindly help,
    Thanks,
    Saju

    Pre-mapping process is use to perform some operations preceding to mapping operation itself.
    For example, if your mapping is designed to incrementally append data to table for the definite time interval (witch is a parameter of the map operation) you might want to perform the table data cleanup for that period. That will allow for reload data number of time.
    In this case you have to define the procedure witch perform cleanup and than include the call to that procedure as a pre-mapping process.
    Other examples of pre- and post mapping process is disabling referential integrity before loading and re-enabling them after loading.
    Anyway, OWB documentation has clear definition for pre- and post-mapping processes.

  • Problems with pre-mapping process in owb 9i

    Hi,
    I was trying to use the pre-mapping process operator in owb 9i. Problem is that the manual does not specify how the inputs need to be connected to this operator.
    Following is what I went through -
    I created a mapping table operator and a mapping dimension operator and connected these two. Then i created a pre-mapping process operator selecting the LTRIM function. Further I connected one of the table attributes to this pre-mapping operator as input and connected the output of this pre-mapping operator to the appropriate dimension operator attribute.
    On performing Validate, following error message was flashed -
    VLD-2451 : Illegal connection to pre-mapping process operator
    I am trying to learn how to use OWB 9i from the manual. So my interpretation of the use of the pre-mapping process operator may be wrong.
    In any case kindly help,
    Thanks,
    Saju

    Hi,
    Essentially the pre (and post) mapping processes are executed before and after the mapping logic. These are separate procedures in the generated package and are "stand alone" from the main package procedure holding the actual mapping diagram.
    If you want to use LTRIM, there are 2 supported ways:
    1) use an expression, this means you feed the column you want to do the expression on into the expression operator, open the code editor and select from the transformations (or type ltrim......) and then link the result to the target object
    2) use a transformation operator, choose ltrim from the Oracle library and connect the operator as I stated in use case 1
    We do not encourage you to use a filter to do transformations, it is better to use the operators that are intended for transformations.
    Thanks,
    Jean-Pierre

  • Post mapping for Reject records!!

    hi
    I would like to capture all the rejected records when I am loading the fact table. I know I can get this information from WB_RT_ERRORS and WB_RT_ERROR_SOURCES. But, what I would like to do is to have Post mapping process which and the action set to "on error", I would like to capture all the reject records into a flat file. Is there a way I can identify reject in the post mapping process other than referring to WB_RT_ERRORS and WB_RT_ERROR_SOURCES in runtime.Because this is what client is requesting for , Any help on this would be greatly appreciated.
    Please mark me directly also since I do not get emails sometimes through the distribution list.
    Thanks in Anticipation,
    Balaji

    Reposting the response from M.Van Der Wiel:
    2 comments:
    - Ideally, you would explicitly capture the errors, and insert those into a separate table. This would enable you to run the mapping in set-based mode (traditionally this means: no error logging) for optimal performance, and you still get the errors. This does mean you would have
    to explicitly design what may go wrong, so you should know what your data looks like. Your flat file could then be created out of the explicit error records, which is probably a bit easier (and faster) than to go from the WB_RT_ERRORS.
    - The mapping errors out once the maximum number of errors is reached (as passed at runtime; is defaulted by the configuration setting). Anything in between 0 and the maximum number of errors will result in a status warning.
    To do what you want to do, you could indeed use the post mapping process, but perhaps you want to design a separate mapping to write the errors to a file, and use a process flow (with conditional sequencing) to run the second mapping (only if the first one fails or results in a warning). This may be a nicer solution than to write the code manually and implement it as a standalone post-mapping process.
    Finally, notice that WB_RT_ERRORS and the like are not tables you should directly query (they will change in the future). Rather you should use the ALL_RT_<something> views to access the same information. Going forward, as the customer desires to migrate to a later release, it is
    more likely that their customizations still work.
    Thanks,
    Mark.
    PS.
    Another possiblity - if the errors violate a key constraint - would be to configure the mapping target with the constraints parameter set to false and redirect the error records to a error table (this can be done in the mapping configuration - sources and targets section). This configuration will disable the constraints during the load and re-enable them after the load, putting the offending records in the error table. You can then download the records from the error table into a flat file in a separate mapping or in a post-mapping process.
    Regards:
    Igor

  • Problem using pre-mapping process operator in owb 9i

    Hi,
    I was trying to use the pre-mapping process operator in owb 9i. Problem is that the manual does not specify how the inputs need to be connected to this operator. Following is what I went through -
    I created a mapping table operator and a mapping dimension operator and connected these two. Then i created a pre-mapping process operator selecting the LTRIM function. Further I connected one of the table attributes to this pre-mapping operator as input and connected the output of this pre-mapping operator to the appropriate dimension operator attribute. On performing Validate, following error message was flashed -
    VLD-2451 : Illegal connection to pre-mapping process operator
    I am trying to learn how to use OWB 9i from the manual. So my interpretation of the use of the pre-mapping process operator may be wrong.
    In any case kindly help,
    Thanks
    Saju

    Pre-mapping process is use to perform some operations preceding to mapping operation itself.
    For example, if your mapping is designed to incrementally append data to table for the definite time interval (witch is a parameter of the map operation) you might want to perform the table data cleanup for that period. That will allow for reload data number of time.
    In this case you have to define the procedure witch perform cleanup and than include the call to that procedure as a pre-mapping process.
    Other examples of pre- and post mapping process is disabling referential integrity before loading and re-enabling them after loading.
    Anyway, OWB documentation has clear definition for pre- and post-mapping processes.

  • Error handling in post-mapping (10gR2)

    Hi all,
    I raised an application error in a procedure executed in post-mapping with :
    raise_application_error (-20001, varMessage) ;
    but when it raised the mapping is not marked on error and there is nothing in the mapping execution details displayed in the audit browser about the error.
    Is there a way to make the mapping failed in case of problem in a post-mapping procedure ? The raise_application_error seems work in OWB 10.1.0.4 but not in OWB 10.2.0.2.
    Thanks
    Regards
    Matthias

    Hum .... it fact the raise_application_error works and marks the mapping failed....
    My exception was catched by another procedure ...

  • Post Operation Processing Initiated status after completion of approvals

    Hi All,
    I have implemented an approval work flow that has two levels of approvals. The two levels of approvals are completed successfully, but the status of the request is not changing to "Request Completed". The status of the request is showing as "Post Operation Processing Initiated".
    Please let me know what needs to be done for the status of the request to be changed to "Request Completed".
    Thanks in advance for your help.

    Check for any manual provisioning task assigned to system admin or any other user according to the configuration you have provided and complete it. "Post Operation Processing Initiated" status comes after operation level approval gets completed and some provisioning task is pending. If everything is completed check for Task to object status mapping and change it to Provisioned as suggested by Rajiv.
    If you still could not find what is the reason then connect to OIM db and query OSI and ORC tables to check the task which is in pending status.
    Edited by: Durgaprasad on Jan 28, 2013 8:58 PM

  • FPGA Compile Error due to error in mapping process

    Received the following error while trying to compile a FPGA VI on a PC. (Refer to attachment for details). My PC has a fresh installation of English Windows 2000 with sp4. No other software is installed except LabVIEW 8.2 & FPGA Module 8.2 & NI-RIO.
    I have checked this KB and confirmed that regional settings are English. But the error still exists. I tried compiling the same VI on my laptop with Windows 2000 sp4 and it was successful. Can someone help me? Thank you very much!
    FPGA Compile Error When Compiling LabVIEW FPGA VI
    Error found in mapping process, exiting...
    Errors found during the mapping phase.  Please see map report file for more
    details.  Output files will not be written.
    Design Summary
    Number of errors   :  17
    Number of warnings :   8
    ERROR:Xflow - Program map returned error code 2. Aborting flow execution...
    Message Edited by maimai on 01-08-2007 01:00 AM
    Attachments:
    FPGA Compile Error.txt ‏8 KB

    Hello,
    The key will of course be to isolate differences between your machines.
    I wonder if the following more specific language setting could be the lingering problem.  LabVIEW is a non-unicode program, and there is a language setting in Windows (at least XP) specifically for non-unicode programs.  Try the following (or it's Win2K equivalent) if you haven't already:
    0. Open "Control Panel"
    1. Open the "Regional and Language Options"
    2. On the Advanced tab, choose English (United States) from the drop-down menu under the top section "Language for non-Unicode Programs"
    - This language setting is different from the setting on the "Regional Options" tab. 
    Any other differences you can isolate would be potentially insightful - if you have the same software versions installed in the same order on both machines, we may be looking for something a bit subtle, such as the suspected language setting.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Truncate tables in pre-mapping process

    I am using OWB 9.0.4 and I have 10 staging area tables that I will be loading in one mapping. I want to truncate all of these tables before I load them. I can not use the TRUNCATE/INSERT option on the target tables because each table will be loaded from two different source tables and I can't specify order in the mapping so I can't have one TRUNCATE/INSERT and the other just INSERT. I would prefer not to have two mappings. I have also tried doing a union on the two source tables but this was not working out well. If I use a pre-mapping operator and select the WB_TRUNCATE_TABLE function, how do I specify multiple tables?
    Is there a better way to do this?

    WB_TRUNCATE_TABLE function takes in only one parameter, so you would have to have 10 pre-mapping processes with that function, or a single one with a custom function.
    I guess you figured the other two choices yourself:
    - If your sources have the same number of attributes and matching datatypes - map them through a Set Operator in a single map with TRUNCATE/INSERT loading type
    - If your sources are different, put them in different maps, with TRUNCATE/INSERT on one and INSERT on the other. Then you can control the order of map execution.
    Nikolai

  • Pre-mapping process seems to be called after instead of before

    Hi,
    I'm new here and this is my first time posting, so please be gentle! :-)
    Running OWB 10.2.0.1.0 on an oracle 10g target db and a 9i source db.
    I have a mapping which contains a pre-mapping process and it contains a simple mapping from a source view into the target table.
    When I look at the generated code, the pre mapping process is at the bottom, after the main insert part of the mapping.
    Next, when I perform a test, updating a test record and following it through the logic, it seems that the pre-mapping process really is in fact getting called after the main mapping.
    Has anyone experienced this?
    Thanks,
    Sammi

    Resolved. Pre-mapping works fine and as intended. Problem in logic was elsewhere.

  • Pre-Mapping Process Operator

    We are not getting any documentation, how to use Pre-Mapping Process Operator(I went through the help documentation and tried to apply whatever is there).
    I am using this operator for a function that returns single value. The output of this operator I want to load into the Expression input and expression operator output I want to load into the target table. The output from the Pre-mapping Operator is blank when I am seeing indebugging mode. I am not getting result in execution mode also. Its a simple function that returns number. The function is
    FUNCTION Tesppt RETURN NUMBER IS
    BEGIN
    RETURN 100;
    END;
    I want to know how Pre-Mapping operator works . When I am using the function in expression it works fine.
    I tried out simple mapping to load a table, it did not work out. The code generated is
    CREATE OR REPLACE PACKAGE "TEREEES" AS
    sql_stmt VARCHAR2(32767);
    get_abort BOOLEAN := FALSE;
    get_trigger_success BOOLEAN := TRUE;
    get_errors NUMBER(22) := 0;
    get_status NUMBER(22) := 0;
    -- Status variable for Batch cursors
    "TEST_PP_St" BOOLEAN;
    "PREMAPPING_0_VALUE" NUMBER;
    -- Function Main -- Entry point in package "TEREEES"
    FUNCTION Main RETURN NUMBER;
    END "TEREEES";
    CREATE OR REPLACE PACKAGE BODY "TEREEES" AS
    -- Function "TEST_PP_Bat"
    -- performs batch extraction
    -- Returns TRUE on success
    -- Returns FALSE on failure
    FUNCTION "TEST_PP_Bat" RETURN BOOLEAN IS
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SESSION ENABLE PARALLEL DML';
    BEGIN
    INSERT
    /*+ APPEND PARALLEL(TEST_PP, DEFAULT, DEFAULT) */
    INTO
    "TEST_PP"
    ("C1",
    "C2")
    (SELECT
    "TEST_COUNTRY"."CODE" "CODE",
    "PREMAPPING_0_VALUE" "VALUE"
    FROM "TEST_COUNTRY" "TEST_COUNTRY"
    COMMIT;
    EXCEPTION WHEN OTHERS THEN
    ROLLBACK;
    COMMIT;
    RETURN FALSE;
    END;
    COMMIT;
    RETURN TRUE;
    END "TEST_PP_Bat";
    FUNCTION Main RETURN NUMBER IS
    get_batch_status BOOLEAN := TRUE;
    BEGIN
    -- Pre-Model Triggers
    BEGIN
    "PREMAPPING_0_VALUE" :=TESPPT();
    EXCEPTION WHEN OTHERS THEN
    get_trigger_success := FALSE;
    END;
    -- Initialize all batch status variables
    "TEST_PP_St" := FALSE;
    IF get_trigger_success THEN
    "TEST_PP_St" := "TEST_PP_Bat";
    END IF;
    RETURN get_status;
    END Main;
    END "TEREEES";
    Thanks in advance.

    We are having one table which will be populated from other source. It will have one value and we need to fetch that value and this value will be constant for the the whole mapping as there is only one record. So, this the reason why we wanted to do this process before the start of the mapping. The code that I have pasted is sample that I did as an trial for testing how pre mapping process operator works.
    Actually we are using expression and in expression for every record, we don't want to call a function. We want to call function once only so thats the reason why we are using Pre-Mapping Process operator. I don't think that there is anything better than this but the function returns no value when we are using the Pre-Mapping process operator but when I use this function in the outgroup of the expression it returns the value.
    I wanted to see how Pre-mapping operator works, so we tried out simple mapping with simple function but did not work there also. This simple mapping code is there in the query that I asked first.
    Thanks in Advance

  • APEX as Partner APP in SSO - Post Authentication Process

    I am trying to get APEX to work as Partner APP with SSO. It's almost working but a vitol piece doesn't cooperate.
    In my old authentication scheme (built-apex) I have a Post-Authentication Process (see below) that needs to set my page 0 items. When I put this into my new authentication scheme for SSO and try to log-in, I get a blank screen.
    If i take it out, my screen displays fine, but my page 0 items are not set with the correct values. What am I missing?
    DECLARE CURSOR get_user_defaults IS
    select B.fk_school, B.year, B.pk_id,
    nvl(A.user_type,'N') user_type
    from "#OWNER#".sis_user_roles B, "#OWNER#".sis_user A
    where A.user_name = :APP_USER and
    B.fk_sis_user = A.pk_id
    order by decode(B.default_role,'Y',1,2);
    BEGIN
    FOR user_defaults_loop in get_user_defaults LOOP
    :P0_LOGIN_SCHOOL := user_defaults_loop.fk_school;
    :P0_LOGIN_SCHOOL_YEAR := user_defaults_loop.year;
    :P0_LOGIN_ROLE := user_defaults_loop.pk_id;
    :P0_USER_TYPE := user_defaults_loop.user_type;
    EXIT;
    END LOOP;
    END;

    not sure what the problem is. Are you sure that :app_user is set already?
    However it looks as if you get an error (might result in blank screen) during your process.
    btw: the pL/sqkl block could be rewritten into a single sql select without any loop.
    BEGIN
      SELECT fk_school, year, pk_id, user_type
      INTO  :P0_LOGIN_SCHOOL, :P0_LOGIN_SCHOOL_YEAR, :P0_LOGIN_ROLE, :P0_USER_TYPE
      FROM ( 
        select B.fk_school, B.year, B.pk_id,
        nvl(A.user_type,'N') user_type, rownum rn
        from "#OWNER#".sis_user_roles B
            , "#OWNER#".sis_user A
        where A.user_name = :APP_USER
        and B.fk_sis_user = A.pk_id
        order by decode(B.default_role,'Y',1,2)
      where rn <= 1
    exception
      when no_data_found then
         raise_application_error(-20001,'User "'|| :APP_USER ||'" not found!');
    END;

Maybe you are looking for