Dynamical mapping of source columns to target columns

Hi,
I have a requirement in ODI,
In source system data having like below
Case1: Column1 having the account related data.
case2: Column2 having the account related data.
But in target area I have only one fixed column called account. Now my aim is to populate the account column with case1 and case2 data with in a single execution that means I need assign above source columns at run time.
How can I achieve this? Please help me on this.
Does ODI have any API’s for above type of logic? Please let me know.
Thanks in advance
Regards,
Giri
Edited by: Mannepalli on Aug 26, 2008 11:08 AM

Hi,
I am not sure, if I completely understand your question. Depending on your target technology (e.g. Oracle), you could use something like the following in the target mapping:
case
when (case1) then column1
when (case2) then colunm2
else column3
end
If you set this mapping to be executed on the target, then itshould work.
HTH,
HH

Similar Messages

  • Idoc to jdbc mapping duplicate source node to target structure

    Dear all,
    I am working on PI 7.1
    My sceniro
    IDOC to JDBC  [sap to mssql ]  where the target is a table structure shown below: I execute a stored procedure to insert the below message type into sql table.
    <ns0:MT_SP_LFBK xmlns:ns0="http://test.com">
    - <Statement_Name>
    - <storedProcedureName action="EXECUTE">
      <table>spr_test</table>
      <BANKS type="Char">BOA</BANKS>
      <BANKL type="char">122207</BANKL>
      <BANKN type="char">4555--0</BANKN>
      <LIFNR type="char">1100000218</LIFNR>
      <KOINH type="char">varchar</KOINH>
      <BKONT type="char">01</BKONT>
      <BANKA type="varchar">S.A.</BANKA>
      </storedProcedureName>
      </Statement_Name>
      </ns0:MT_SP_LFBK>
    The mapping is between source CREMAS02 and the above target structure. Everything works fine.
    The problem is when the  vendor has more than one bank account number the IDOC CREMAS02 replicates the below segment E1LFBKM for each BANK account information. Since target and source are mapped one to one how can i map the second bank account information to the same target structure or genereate a new target Message type for the second bank account  information and send it to sql ?
    <E1LFBKM SEGMENT="1">
      <MSGFN>005</MSGFN>
      <LIFNR>110000021</LIFNR>
      <BANKS>BOA</BANKS>
      <BANKL>122207</BANKL>
      <BANKN>4555-0</BANKN>
      <BKONT>02</BKONT>
      <BANKA>S.A.</BANKA>
      <BNKLZ>3000000</BNKLZ>
      </E1LFBKM>
    Thank you ,
    Teresa

    Hi Teresa,
    which segment have you mapped with <storedProcedureName action="EXECUTE"> ?
    Because according to me , if you send <E1LFBKM> to <storedProcedureName action="EXECUTE">
    , you will be able to use your stored procedure several times, in fact each times that you have a <E1LFBKM>.
    Reminds: inside <Statement_Name> you can do several SQL actions like execute one or several stored procedures (could be different).
    Of course, after that your table should accept to have several bank account for a same customer.
    So to have something like that:
    <Statement_Name>
    <storedProcedureName action="EXECUTE">
    </storedProcedureName>
    <storedProcedureName action="EXECUTE">
    </storedProcedureName>
    <storedProcedureName action="EXECUTE">
    </storedProcedureName>
    </Statement_Name>
    regards
    mickael

  • Mapping constant values to the target data source columns

    Hi
    A Target data source has only two columns(RPT_NAME, RPT_LEVEL) and both of them are constants and mapped as follows
    WITH TEMP1 AS
    (select 'AS' as A from dual
    union
    select 'IS' as A from dual
    union
    select 'ED' as A from dual
    select t.A as RPT_NAME, 'INV' as RPT_LEVEL from TEMP1 t
    Here there is no source tabel involved for mapping and gnerating a from query.
    Kindly let me know hoto map this table.
    Thanks

    Hi Amit
    Is there a way we can create an intermediary staging table or model or view in ODI itself, the business requirements are such that the source and the target databases cannot change/include any other view or table .
    Thanks

  • Retrieving Source Column name for a target

    Hi
    I have a requirement where in if an interface errors out because of some constraint violation in the target column, the error message should contain the following details
    a. One lined Error message (Not with the ORA codes and complete details)
    b. The source column mapped to the tarteg column that has violated the constraint.
    c. The exact row where the error has occured while transferring the data.
    I am using IKM SQL Control Append and as per the requirement the Flow Control is set to 'No'
    Kindly help me resolve this issue.
    Thanks

    Hi Nidhish,
    You can configurate all those information using a ODI constraint (type "User Constraint") at target datastore.
    Did you already try it?

  • Mapping-source column(for the measure)disappears after pressing apply

    I am using AWM 11.2.0.2.0B and Oracle 11.2.
    I have successfully mapped my dimensions. Then I defined a stored measure, say DISTANCE and I want to map it to a column in my database. When I click the "apply" button, the mapping disappears! And I can not find any error messages. I have tried mapping another column to it (defining a different measure), still the mapping disappears after applying.
    The type of the data(measure) is number(22) in my database, so I choose Data type: Number, Precision:22 and Scale=0 in my cube(storage section) and I check "use compression", therefore the measure will inherit the mentioned data type (of cube). I also tried using integer as the data type, no success. I first doubted that it expects some different type of data to be mapped, but seems that is not the problem. Every column I put there as my source column disappears after clicking on apply!
    Any idea what the problem is or where I should find a log?
    Edited by: 903009 on Dec 17, 2011 10:03 PM
    Edited by: 903009 on Dec 17, 2011 10:05 PM

    Hi Veeresh,
    As per my understanding, this error happens when the OLE DB Source component cannot find the corresponding source column in the database table. Possible reason is the the column name in the external database table has changed or
    the column has been removed.
    To verify this issue, please go to the Advanced Editor for OLE DB Source Input and Output Properties tab to see the External columns and Output columns. To fix it, please refresh the data or recreate the Source.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Is it possible to have duplicate columns from source List to target List while copying data items by Site Content and Structure Tool in SharePoint 2010

    Hi everyone,
    Recently ,I have one publishing site template that has a lot of sub sites which  contain a large amount of  content. 
    On root publishing site, I have created custom list including many custom fields 
    and saved it as  template  in order that 
    any sub sites will be able to reuse it later on .  My scenario describe as follows.
    I need to apply Site Content and Structure Tool to copy   a lot of items
     from  one list to another. Both lists were created from same template
    I  use Site Content and Structure Tool to copy data from source list 
    to target list  as figure below.
    Once copied  ,  all items are completed.
     But many columns in target list have been duplicated from source list such as  PublishDate ,NumOrder, Detail  as  
    figure below  .
    What is the huge impact from this duplication?
    User  can input data into this list successfully  
    but several values of some columns like  “Link column” 
    won't  display on “AllItems.aspx” page 
    .  despite that they show on edit item form page and view item form page.
    In addition ,user  can input data into this list  as above but 
    any newly added item  won't appear on 
    on “AllItems.aspx” page
    at all  despite that actually, these 
    item are existing on  database(I try querying by power shell).
    Please recommend how to resolve this column duplication problem.

    Hi,
    According to your description, my understanding is that it displayed many repeated columns after you copy items from one list to another list in Site Content and Structure Tool.
    I have tested in my environment and it worked fine. I created a listA and created several columns in it. Then I saved it as template and created a listB from this template. Then I copied items from listA to listB in Site Content and Structure Tool and it
    worked fine.
    Please create a new list and save it as template. Then create a list from this template and test whether this issue occurs.
    Please operate in other site collections and test whether this issue occurs.
    As a workaround, you could copy items from one list to another list by coding using SharePoint Object Model.
    More information about SharePoint Object Model:
    http://msdn.microsoft.com/en-us/library/ms473633.ASPX
    A demo about copying list items using SharePoint Object Model:
    http://www.c-sharpcorner.com/UploadFile/40e97e/sharepoint-copy-list-items-in-a-generic-way/
    Best Regards,
    Dean Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Dynamic mapping: I have no Class. I want to get database columns into a map

    I want to practice dynamic mapping.
    I don't know the class in development time. I know the attributes only on runtime. Then I create the table, and want to practice OR Mapping to get and set data in this table while all I have is aa map of fields (Strings/int for direct-to-field mappings, Lists, Objects, etc.) - against this new table.
    I have no Class. Neither source nor Class object in hand.
    In Hibernate it is possible and very well documented. It's called "Dynamic Model". I have to get a special Hib session from a session i already have, and it starts to work with Maps and not real classes and objects.
    Here is the command in Hib: sess.getSession(EntityMode.MAP);
    Thanks in advance.
    Doron

    Doron,
    We have been working with dynamic models and byte code weaving for a while now. I took some work I did a few months back now and upgraded it to work with EclipseLink JPA. I have started creating an example within EclipseLink to both illustrate how EclipseLink can be extended to deliver this dynamic mapping and also to start consolidating our existing dynamic support in our SDO and DBWS components into a more general solution that be used out of the box with JPA.
    I have started a wiki page to illustrate how this functionality can be used. Take a look and let me know if this might address your requirements.
    http://wiki.eclipse.org/Eclipselink/Examples/JPA/Dynamic
    Doug

  • Re: source column condition

    Yes you can keep it as input only port.  

    i have  Two columns in the source, one is for condition and other one is for returning the records. and in the target i have 3 columns, each target column should be mapped by one same source column based on the other source column condition. Example: Source Has Columns  Expenses, TYPE;  Target Has Columns X, Y,Z scenario:1. If TYPE='A' then Load Expenses to  Target column X2. If TYPE='B' then Load Expenses to  Target column Y3. If TYPE='C' then Load Expenses to  Target column Z  what's the best way to implement this, which transformation should i use, i am also mapping other columns which are pass through from source to target along above columns.

  • Source column condition

    i have  Two columns in the source, one is for condition and other one is for returning the records. and in the target i have 3 columns, each target column should be mapped by one same source column based on the other source column condition. Example: Source Has Columns  Expenses, TYPE;  Target Has Columns X, Y,Z scenario:1. If TYPE='A' then Load Expenses to  Target column X2. If TYPE='B' then Load Expenses to  Target column Y3. If TYPE='C' then Load Expenses to  Target column Z  what's the best way to implement this, which transformation should i use, i am also mapping other columns which are pass through from source to target along above columns.

    hi I want to create a file with muiltple header detail and trailorSample of my file  1F99500094959                    5F99000000999911025F99000000999912025F99000000999913029F99500094959                    1G83341002729803                5G83000000999918020109G83341002729803                1G83910377940                    5G830000009999190201011050003522029G83910377940                    T20110720000000900000006750{  In this file 1 is header and 5 is detail and 9 is trailer and in last T segment is also trailerI have any idea to create seperate 3 files and in lastconcatenate all file with the help of unixbut in my case data is so large (in millions) this approach is not use full please suggest my any ideaHow to create VSAM file

  • Output Column does not have a matching source column in the schema

    Hi Everyone,
                           Can you please help me in this. Already an ETL is loading the data from AS400 TO SQL server. I need to add a new
    column. In the Source (OLEDB source) am pulling the data from AS400 using ADO.NET connection manager.
    New column is added in AS400. To bring the new column from AS400, I added column name in the query in OLEDB source. Test connection is good. In the Source editor, when I click on preview it gives me the values of the new column and if I click on build
    new query also it gives me values for the new column.
    After mapping the columns and refreshing the data in OLEDB destination, I don't see any errors or warnings.
    But when I start executing the package it throws me the below error.
     Error: The output column  (4659) does not have a matching source column in the schema.
    [SSIS.Pipeline] Error: "component  (2861)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
    I need suggestion on this.
    Thanks
    Veeresh

    Hi Veeresh,
    As per my understanding, this error happens when the OLE DB Source component cannot find the corresponding source column in the database table. Possible reason is the the column name in the external database table has changed or
    the column has been removed.
    To verify this issue, please go to the Advanced Editor for OLE DB Source Input and Output Properties tab to see the External columns and Output columns. To fix it, please refresh the data or recreate the Source.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to clone data with in Table with dynamic 'n' number of columns

    Hi All,
    I've a table with syntax,
    create table Temp (id number primary key, name varchar2(10), partner varchar2(10), info varchar2(20));
    And with data like
    insert itno temp values (sequence.nextval, 'test', 'p1', 'info for p1');
    insert into temp values (sequence.nextval, 'test', 'p2', 'info for p2');
    And now, i need to clone the data in TEMP table of name 'test' for new name 'test1' and here is my script,
    insert into Temp  select sequence.nextval id, 'test1' name, partner, info from TEMP where name='test1';
    this query executed successfully and able to insert records.
    The PROBLEM is,
    if some new columns added in TEMP table, need to update this query.
    How to clone the data with in the table for *'n' number of columns and*
    some columns with dynamic data and remaining columns as source data.
    Thanks & Regards
    PavanPinnu.
    Edited by: pavankumargupta on Apr 30, 2009 10:37 AM

    Hi,
    Thanks for the quick reply.
    My Scenario, is we have a Game Details table. When ever some Game get cloned, we need to add new records in to that Table for the new Game.
    As, the id will be primary key, this should populate from a Sequence (in our system, we used this) and Game Name will be new Game Name. And data for other columns should be same as Parent Game.
    when ever business needs changes, there will be some addition of new columns in Table.
    And with the existing query,
    insert into Temp (id, name, partner, info) select sequence.nextval id, 'test1' name, partner, info from TEMP where name='test'_
    will successfully add new rows but new added columns will have empty data.
    so, is there any way to do this, i mean, some columns with sequence values and other columns with existing values.
    One way, we can do is, get ResultSet MetaData (i'm using Java), and parse the columns. prepare a query in required format.
    I'm looking for alternative ways in query format in SQL.
    Thanks & Regards
    PavanPinnu.
    Edited by: pavankumargupta on Apr 30, 2009 11:05 AM
    Edited by: pavankumargupta on Apr 30, 2009 11:05 AM

  • Dynamic Table with two columns

    Hi!
    i have to create a Dynamic Table with two columns having 5-5 links each with some text...... three links r based on certain conditions....they r visible only if condition is true...
    if the links r not visible in this case another links take it's place & fill the cell.
    links/text is coming from database.
    i am using Struts with JSP IDE netbeans
    Please help me
    BuntyIndia

    i wanna do something like this
    <div class="box_d box_margin_right">
              <ul class="anchor-bullet">
              <c:forEach items="${data.faqList}" var="item" varStatus="status"
                        begin="0" end="${data.faqListSize/2-1}">
                        <li>${item}</li>
                   </c:forEach>
              </ul>
              </div>
              <div class="box_d">
              <ul class="anchor-bullet">
              <c:forEach items="${data.faqList}" var="item" varStatus="status"
                        begin="${data.faqListSize/2}" end="${data.faqListSize}">
                        <li>${item}</li>
                   </c:forEach>
              </ul>
              </div>
    wanna divide table in two columns....if one link got off due to condition other one take it's position...
    I have created a textorderedlist
    Bunty

  • Dml error logging: can we pass source column values to ora_err_tag$

    Hi Experts,
    We can set ora_err_tag$ values while implementing dml error logging feature.
    Can we pass source column values to ora_err_tag$ field of error table?
    Thanks,
    Dhiraj

    F5wrong forum
    Philip

  • How to map multiple source structures to single target structure

    Hi all,
    I have the scenario of 2 input files so i am using BPM for it. I have created the message types of the 3 input files. I have to finally generate an XML file which will contain the data of all the 2 files. That is i have to do 3:1 mapping.
    Source Structure of File 1:
    <b>DT_PWC_Customer</b>
    <i>RECORDSET</i>
      <u>CUSTOMER</u>
       <i><b>REF_NO</b></i>
       <i><b>CUSTOMER_NO</b></i>
    Source Structure of File 2:
    <b>DT_PWC_Customer</b>
    <i>RECORDSET</i>
      <u>METER</u>
       <i><b>REF_NO
       METER_NO</b></i>
    Target Structure of Final Output File:
    <b>DT_PWC_CustomerMeterData</b>
    <i>RECORDSET</i>
      <u>CUSTOMER_METER</u>
       <i><b>REF_NO
       CUSTOMER_NO
       METER_NO</b></i>
    Above nodes i have shown in a heirarchical order..nodes with same indentation are at same level.
    Can anybody tell me how to do this mapping in IR in graphical editor.
    RAJEEV GUPTA

    Hi,
    To elaborate my requirement, I want to tell that since i will be having 2 input files- one for Customer & one for Meter. I want to finally generate one XML file which will have data from both these 2 input files. That is, if Customer file has 3 records(3 REF_NO, 3 CUSTOMER_NO) and Meter file has 4 records(4 REF_NO, 4 METER_NO), the final output XML file  will   have 7 records(7 REF_NO, 3 CUSTOMER_NO,4 METER_NO).
    Thanks,
    Rajeev Gupta

  • Mapping 2 source structures to a single target database

    Hi Experts, My scenario is a Proxy to JDBC in which I need to send data from 2 source structures to 1 target table.
    Source structures :                                           Target:
    ABC                                                                 XYZ
      row1                                                                 InsertStatement
        Item1                                                                  DBTable
                                                                        Action
       (Fields)                                                     Table
                                                                                    acess
    DEF                                                                              -
      row2                                                                          -
       item2                                                                         -
      (Fields)
    (Fields)
    Please let me know how to map the 2 source nodes to the target access node to transfer data from the source tables to target database.
    Regards,
    Krishna

    You should make use of BPM to collect the two source structures.
    One of the BPM examples mentioned in IR --> SAP BASIS ---> SystemPatterns can be referred for this purpose.
    Once the messages are collected, perform a 2:1 mapping (two Proxies as source message and one JDBC message as target).
    If you want the mapping logic then please provide a proper format of both your Source and Target messages and the expected mapping, so that someone from SDN can help you out.
    The target structure provided is a bit confusing.
    Are you going to receive two different proxy messages (i.e. two different calls) or just one Proxy call and there you will have two different nodes within the same message??? ...... me confused
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Sep 25, 2009 11:51 AM

Maybe you are looking for

  • Error While Opening PDF File in SAP Inbox

    Hello Experts, I am facing a weird error in SAP Inbox while opening a PDF files (both created by custom ABAP programs as well as the one attached to a new SAP Inbox message from my desktop & sent to my Inbox as a test). The error states that "This fi

  • Passing parameter to a report

    i need to add a parameter to report. please help me how to do that? Please add a parameter to the attached report that will allow the user to select u201CSummaryu201D or u201CDetailu201D.  Entitle the parameter: Report Type If the user selects u201CD

  • How to use UTF-8 in JSP ?(Farsi Language)

    Hi All, I am trying to write in Farsi language in a jsp page with jdeveloper. i have a .properties file where i write my lables in farsi.i have content="text/html; charset=UTF-8" in my jsp as well.but still in run-time i get something like ??????????

  • Make TextArea height adjust to fit content

    I'm trying to get my TextArea to resize and fit the content it contains but for some reason the following code causes it to become about 3x higher than the text it contains. Can someone point out what I am doing wrong? Thanks! <?xml version="1.0" enc

  • How to recover messages deleted by sender on mac?

    Please help. I know it is possible on windows, is it on mac too? thanks