Maintaining Master-Child relationship during ODI transformation

ODI Gurus
For following requirement, we need the best approach to transform data from Source to Target instance(Both Source and Target instances are running on Oracle Database)
Tables in Source Instance
a) Source_Master
b) Source_Detail (One to many relationship with Source_Master)
Tables in Target Instance
a) Target_Master
b) Target_Detail (One to many relationship with Target_Master)
In ODI need to create interfaces to transform data from
a) SOUCE_MASTER table to TARGET_MASTER table and
b) SOUCE_DETAIL table to TARGET_DETAIL table
NOTE: Value for Primary Key column in Target Instance tables Target_Master and Target_Detail are generated from Database Sequence.
Once the transformation is completed using ODI, the master-child relationship should be maintained in Target Instance between Target_Master and Target_Detail table. How do we achieve this in ODI ?
Thanks
Uma Shankar

For this, create the first interface for MASTER, in the mapping for the primary key you should map the database sequence, something like: MYSCHEMA.MYSEQUENCE_NEXTVAL.
Create the second interface for DETAIL, and on the sources pane of the interface, drag the SOURCE_DETAIL and TARGET_MASTER datastores. Make the joing between the two using the keys from the source. In the Primary key mapping of the DETAIL_TARGET make sure you select the new PRIMARY KEY of the TARGET_MASTER, mapping in staging area. This "lookup" will be done in the target data server.
If you are going to be doing updates and inserts in the target, you should make sure you set the Update Key selected for each of the targets to the same keys as on the source (obviously you won't have the target values!)
If you are not going to do any updates, then use the IKM SQL Control Append rather than the incremental update IKM.
You can optionally set the COMMIT option of the first interface to NO, and only commit on completion on the second interface if you want to ensure the full 'all or nothing' transactionality - but bear in mind, large volumes of uncommitted changes use resources....

Similar Messages

  • Forms Builder Master Child relationship --- column datas gets hided.

    Hi All,
    I have a screen which have 5 columns. Out of which first 3 columns belong to Table A and 4th column belong to say Table B and the 5th column belong to Table C. There is a master Child relationship between Table A and Table B also between Table A and Table C.
    The issue is, i enter the data for these columns in row wise. I enter all 5 columns with value and when i switch to next row, the 4th and 5th column's value gets hided.
    Please suggest.
    Thanks and Regards,
    KirthiRavi

    KirthiRavi wrote:
    Hi All,
    I have a screen which have 5 columns. Out of which first 3 columns belong to Table A and 4th column belong to say Table B and the 5th column belong to Table C. There is a master Child relationship between Table A and Table B also between Table A and Table C.
    The issue is, i enter the data for these columns in row wise. I enter all 5 columns with value and when i switch to next row, the 4th and 5th column's value gets hided.
    Please suggest.
    Thanks and Regards,hI KirthiRavi
    You have relation with
    Table A with Table B
    Table A with Table Cwhen you switch a record to another record at bloc/table A, it's normal forms behavior it's will hide value of block/table B and C. when your click on associate row of block/table A it will show.
    It's the form normal behavior for relationship.Hope you understand.
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

  • Doubt about  Master-Child relationships.

    Hello,
    I've a doubt about master-child relationships.
    Any row in the master table need to has at least one row in the child table. What do I guarantee that?
    Please, any ideas.
    Thnx.

    If im correct you are asking that any row in master table should have a corresponding child record in detail
    (transaction) table.
    WELL , There is no compulsion that the child table should have a record linking to record in master table.
    Master table is not depended on child table. Child table is dependent on data reference on master table.
    Pls note that Master table is independent of the child table ( in terms of data reference only) .
    This doesnt mean that if you want to delete the master records when child records exists. it gives an error in that case.
    check the following example
    SQL> create table master(n number primary key);
    Table created.
    SQL> insert into master values(1);
    1 row created.
    SQL> create table child(t number references master(n));
    Table created.
    Hello,
    I've a doubt about master-child relationships.
    Any row in the master table need to has at least one row in the child table. What do I guarantee that?
    Please, any ideas.
    Thnx.

  • Displaying master child relationship using datatable??

    Hello,
    I want to display master child data using a datatable or a datalist or any other component ( if can be used for this purpose )....I mean i have a particular role and the nominees in that particular role to be displayed...how can this be achieved....any suggestions....thanks in advance.
    thanks & regards,
    Gaurav.

    For this, create the first interface for MASTER, in the mapping for the primary key you should map the database sequence, something like: MYSCHEMA.MYSEQUENCE_NEXTVAL.
    Create the second interface for DETAIL, and on the sources pane of the interface, drag the SOURCE_DETAIL and TARGET_MASTER datastores. Make the joing between the two using the keys from the source. In the Primary key mapping of the DETAIL_TARGET make sure you select the new PRIMARY KEY of the TARGET_MASTER, mapping in staging area. This "lookup" will be done in the target data server.
    If you are going to be doing updates and inserts in the target, you should make sure you set the Update Key selected for each of the targets to the same keys as on the source (obviously you won't have the target values!)
    If you are not going to do any updates, then use the IKM SQL Control Append rather than the incremental update IKM.
    You can optionally set the COMMIT option of the first interface to NO, and only commit on completion on the second interface if you want to ensure the full 'all or nothing' transactionality - but bear in mind, large volumes of uncommitted changes use resources....

  • Issue with Master and child relationship,viewlink

    Hi Frnds,
    In one of our custom pages we have Master child relationship between Invoice lines and their distributions.
    Things work absolutely fine when total no of distributions(say 10) are equal to max no of distributions that can be shown on 1st page(i.e equal to advancetable property value 'Records displayed'..say set as 10)
    What happens is when in advance table I click on next button to navigate to next set of records and then edit some field that have any event..ppr or lov my control by default gets transferred to very first set of records.
    !!!!!!!!!!!!!! Also this happens only when no of invoice lines are more than 1.
    I not sure whether the issue is with VL,VO,AO or the advance table property.
    One simple solution that I have tried is...getting back the focus to the row that is updated but it causes some other problem.
    Any pointers will be very helpful
    Thanks in advance.

    Hi any help???

  • Problem with master/detail relationship

    Two tables :
    Master_table:
    Customer_no primary key
    Buyer_seller_type primary key
    Product_code primary key
    Detail_table
    Branch primary key
    Customer_no primary key
    I altered detail_table and added 2 more primary key fields:
    Buyer_seller_type primary key--
    Product_code primary key.
    Now I have to change the existing fmb according.
    I have maintained master/detail relationship for these 2 tables in the form.
    When I run this form and Try to save the date . I am getting error like
    Cannot insert null into buyer_seller_type field ie my new column.
    Insert into detail_table (branch,customer_type) values (:1,:2) ;
    I have maintained master/detail relationship. And what r the others properties I have to set to overcome this .
    my requirement is query should be like this:
    insert into detail_table (branch,customer_type,buyer_seller_type,product_code) values (:1,:2,:3,:4) ;
    how can i do this.
    I am using forms 6.
    plz its very urgent..plz help me.
    advance thanks

    Set following item property under Data node for both the new added column in detail table:
    Copy Value from Item:
    Enter <master_table_name.item_name>
    Regards,
    Hassan

  • Customer Master -- Parent + Child Relationship

    Hi
    I have an requirement from user asking me to set Parent -Child relationship for a customer.
    Correct me if i am wrong.
    I have customer numbers 1000 and 2000.
    In "payment transactions" tab , i have included 2000 in "Alternat. Payer" field. So now 2000 will be the alternative payer for 1000 customer.
    I want to see this relationship in FBL5N. In what way should i ensure that the functionality is maintained.
    Please let me know
    Thanks
    Rajanikanth.

    Please note I do not respond direct through e mail, only on this forum.
    If the customer has not been set up correctly there will not be any entries in the branch field.
    As mentioned you need to have the parent customer number set as the "payer " partner function in the child's customer account number.
    This will mean you are selling to the chil, but the parent is paying, and this is where the invoice will go to.
    If you have not set the master data up like this, then there will not be any values there for you.
    Please award points if this is helpful and has been helpful so far.

  • Master Detail - Detail parent child relationship

    Hello All,
    I have a setup where I have 3 tables. Call them A, B, and C. Table A is the parent table to the child table B. Also table B is the parent table to the Child table C. Is there a way to represent this in Apex? So far I have created two Master Detail forms: Master Detail form one has the relationship A+B and Master Detail form two has the relationship B+C. Can Apex support a Master Detail Detail form.
    Also, is there a way to have my detail page editable without linking to another page to save and update?
    Please let me know what everyone thinks.
    Thanks
    Ryan

    Hi,
    You can google it - so much information is available online. Any how
    Parent Child relationship
    PK FKBasic example - Parent and Child in real life -similarly the Table_A is having relation with some other Table_B.
    Example
    Table_A
    columns :-
    Student_No, Student Name, Student_address
    Now the Table_B store the assignment details
    Student_No, Subject_1,subject_2, subject_3
    Now relation of join is Table_A.Student_No = Table_B.Student_No
    With out the TAble_A details -can be identified the Sudent details etc., No - It's Master data - which is not dependent on any other table and Column Student_No- Acts Primary Key which is Unique -through which we can identify a specific details of particular student. Now comes to Table_B - with out the student_No - we can't say whose details of assignments belongs to whom - now the student_No in Table_B is dependent on some other table - now this table acts a child and Primary Key of Table_A acts Foreign Key - that column helps to identify the record.
    Master Detail
    Reference tablesconcept of understanding is same when - when comes c,c++, java and c sharp - acts the same but inheritance, interfaces, polymorphisms and overloading code of language differs. If you go further j2ee differs
    HTH
    - Pavan Kumar N
    Oracle 9i/10g - OCP
    http://oracleinternals.blogspot.com/

  • Duplicate rows in Detail Table - Master Detail Relationship

    Hi,
    I have developed the Page it has following components. (Jdeveloper 10g - R12)
    1) Query RN
    It has around 11 parameters, 5 parameters have LOV attached, 2 are mandatory parameters.
    Auto Customization criteria. we don't criteria map defined , where clause is build based on parameters and vo.executeQuery gets called on Go button click.
    2) Sales Order Table RN (Master)
    3) Sales Order Line Table RN (Detail)
    View link is created to maintain the master detail relationship and detail region is attached to AM using view link under master region.
    Page flow works in this way, when user enter the parameters in search region and click on Go button, Sales Order table RN (master) gets populated.
    It has radio button when user click it fires PPR event .
    Process form request gets called and master row gets set (Same code as per developer guide) and Sales Order Line table RN (detail).
    Problem is once detail region gets populate and when user change any parameter which has LOV attached somehow same rows gets added to detail region which is weird because we have not clicked on GO button and radio button on header region is also not touched but detail region is populated somehow.
    Please help
    Thanks.
    Deepak

    Provide the query used for populating the child records. Issue might be due to caching.
    Thanks
    Shree

  • Does table STPOX contain parent-child relationship between components

    Hello
    I need to get a list of components of SO BOM.
    FM CS_BOM_EXPL_KND_V1 exports an output table STPOX.
    Does this table contain parent-child relationship between components? If yes , can somebody tell me which fields contain parent child id.
    thanks

    Hi,
    STPOX is not a table, it is a structure & hence there is no storing of data in a structure. The table which stores this info is STPO.
    To get the link you can refer to STPO-STLNR & pass this value to MAST-STLNR, this way you can link the child with its parent.
    Regards,
    Vivek

  • Office 2013 - SharePoint Web App: How can I link a subform on two Master/Child controls?

    I have a form in which I have placed a subform in a SharePoint Web App.
    I also have 2 controls on the form, from which I'd like to link to two columns on the subform.  How can I have two Master/Child linking relationships to a subform. 
    In Access desktop, it is done in a window "Subform Field Linker", like this:
    Master Fields:          Child Fields:
    <sorry I could not include a link until my account is verified>
    Thanks,
    Keith

    Hi Bruce,
    >>Are subforms in web apps different in this regard?<<
    Yes, there are two kinds of database. In an on-premise environment, Access 2013 apps are hosted by SharePoint 2013 while the data is stored in SQL Server 2012. SharePoint 2013 provides authentication, authorization, and security for Access 2013 apps.
    The back-end tables, views, macros, and queries are stored in a SQL Server 2012 database.
    You can get more detail about Access 2013 web app from link below:
    What's new for Access 2013 developers
    How to: Create and customize a web app in Access 2013
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Master-Detail Relationship problem

    I've spent 1.5 days already trying to solve this problem. I'm creating a JClient application using BC4J with a Master-Detail relationship. The relationship between tables is a many-to-many thru an intersection table. I've gotten my master and detail data to show with columnar form data in the top(master) panel and table data in the lower(detail) panel. My problem is that each time I get a master record that contains more than one detail record, each time I click the next navigation button in the master pane it will remain on the master record for the number of detail entries. For example, if a master record has 3 children, then I must click the next button 3 times to move to the next master record. I know that it has something to do with the way the entities are joined but I can't figure out how to join them any other way. Can anyone give me a hint how I can make the master panel only show one record for each Master-Detail relationship (even though the intersection table says its a many-to-many)?
    Thanks,
    Mark

    Apparently, I was making things much more complicated than they needed to be (rather, JDev was). My first attempt at MD relationships, I followed the examples in the help files. JDev created VO's, Entities, Assoc's, View Links, etc... Everything but the kitchen sink! After researching a bunch more, I found that the only thing I needed to do was to create my view objects to display exactly what I wanted to see in my panel regardless of whether it was a parent or a child. Once I had the view objects straight, then I could connect them using a view link and JDev handled the rest. Pretty slick but, I wish there was some better documentation. My next problem is that I'm trying to make this a Master-Detail-Detail-Detail window. The master needs to be a JComboBox, displays only a date, and needs to appear in the same panel as it's child. The 1st child will have a navbar that cycles through a bunch of orders based on the date from the combo box. The order panel's child is in the lower panel and displays the order detail items. It also has a navbar. The lower detail panel needs to have a split pane with the upper part showing the order detail and the lower part showing the materials used in making up that order detail item.
    So far, I've got the first 3 parts done (ie. combobox, orders, and details). For the combobox, I used a JComboBox navigationbinding. It shows the correct date, but my control is always disabled. I can't figure out why the combobox is always disabled. The enabled property is set to true. Anbody have any clues?
    Thanks,
    Mark

  • Question about File Content Conversion and parent-child relationships...

    Hello!
         I have read probably every blog, article and SAP Help document on the topic, but I am stuck on this one.  I am trying to convert a General Ledger flat file to an IDoc using the classic file --> IDoc scenario.  The setup is done and working, but the IDocs are formatted incorrectly and I believe at least part of the reason is how I am converting the file content. 
    The root of my problem is that the flat file has a parent-child relationship between the document header and the document item and I want to maintain that since the IDoc type (FIDCCP01) has the same structure in the BKPF and BSEG segments.
    Here is the flat (non-XML) file layout that is coming into the file adapter:
    FileHeader
    DocumentHeader
    DocumentItem
    DocumentHeader
    DocumentItem
    and so on (until the number of documents is complete
    I would really like the content to be converted so that the line items stay under their parent document headers like this:
    <FileHeader></FileHeader>
    <DocumentHeader>
       <ItemHeader>
       </ItemHeader>
    </DocumentHeader>
    <DocumentHeader>
       <ItemHeader>
      </ItemHeader>
    </DocumentHeader>
    But I keep getting this, where it lists the document headers first (one after another), and then all of the line items after the document headers like this:
    <FileHeader></FileHeader>
    <DocumentHeader></DocumentHeader>
    <DocumentHeader></DocumentHeader>
    <DocumentHeader></DocumentHeader>
    <ItemHeader></ItemHeader>
    Is is possible to maintain that parent-child relationship from the flat file and pass it over to the XML?
    Thanks,
    John

    Hi,
    Check some links on FCC.
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Regards,
    Phani
    Reward points if Helpful

  • EJB 3, OneToMany that Acts As Tree, or Parent Child relationship support?

    (Sorry for the RoR reference)
    I first searched the forum and found this post that came close, but not exactly what I'm needing since my table doesn't reference the PK:
    http://forum.java.sun.com/thread.jspa?forumID=13&threadID=767913
    I have a table called Folder that represents a folder hierarchy. It has a 'Path' field and a 'Parent' field, and of course 'ID'. Each Folder knows its parent by the 'Parent' field, which references 'Path', not* 'ID'. Both are Strings.
    To find all the children of a Folder, the sql for a PreparedStatment might look something like this (shared for clarity of the situation):
    SELECT * FROM Folder
    WHERE Parent = ?Question:
    What are the proper annotations in EJB 3 / JPA to allow this kind non-primary key parent/child relationship mapping?
    Can I specify a named query that handles the logic and then reference it in the OneToMany annotation? Other cool tricks?
    Here is what I am trying (no runtime errors, but no results either). (Example simplified)
    @Entity
    @Table(name = "Folder")
    @NamedQueries(value = {@NamedQuery(.......)})
    public class Folder implements Serializable {
        @Id
        @Column(name = "ID", nullable = false, updatable = false)
        private Integer folderID;
        @Column(name = "Path", nullable = false)
        private String path;
        @Column(name = "Parent")
        private String parent;
        // v Here's the kicker v
        @OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
        @JoinTable(name="Folder",
            joinColumns={@JoinColumn(name="Parent")},
            inverseJoinColumns={@JoinColumn(name="Path")})
        private List<Folder> children;
        // getters and setters ....
    }Thanks!

    It looks like the relationship is bi-directional.
    Will this work...
    // Parent.java
    @Entity
    public class Parent implements java.io.Serializable {
    @Id
    public Long parentId;
    @OneToMany(cascade=CascadeType.PERSIST,mappedBy="parent")
    public Collection<Child> children;
    // Child.java
    @Entity
    public class Child implements java.io.Serializable {
    @Id
    public Long childId;
    @ManyToOne
    public Parent parent;  // target of mappedBy
    }Then, in your code (a session facade?), you'll create the parent first, create the children, then add the children to the parent. Your code is also responsible for maintaining the reference back to the parent.
    Parent p = new Parent();
    for(int i=0; i<10; i++) {
      Child c = new Child();
      p.children.add(c);
      c.parent = p;
    em.persist(p);

  • Master Detail Relationship and Posting changes!

    I have a "MAster" medical-procedure block, and an "Detail" items block. The items block, being the detail block, in the master detail relationship shows the items used during the medical procedure. Both the master and detaqil blocks are based on stored procedures.
    Problem: I have multiple medical procedures (multi record master) and many items associated with the procedure (multi record detail). If I ask the user to "SAVE" the changes, after every detail entry ( for the correspondin master), it becomes a "PAIN" for the user. He wants to be able to choose a procedure, choose the details(items) associated with that procedure, and move on to the next master record, (the next medical procedure) , select it, if he performed that procedure, choose its corresponding detail items, "WITHOUT SAVING IN BETWEEN" navigation between the master records / "MEDICAL PROCEDURES"!
    1. Is it better to go for a master-detail relationship? If so, how do I prevent the "Please save the changes" when navigating between master records and ALSO save the details, without doing the "SAVE" multiple times. Can I go for a post ?..If so where? When-new_record instance/ any "Form level trigger"?
    2. If I do the go_block('dtl blk name'); execute_query; thing to coordinate between blocks, and "post" changes in the when -new -record-instance of master, the detail complains of a null value when I move from a medical procedure to another medical procedure which is not actually performed.
    I hope I make sense, any suggestions , "Welcome"!
    Thanks!

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

Maybe you are looking for

  • Two questions about my "new" used Macbook

    Hello everyone, I recently bought a Macbook for my wife from craigslist. It is a early 2008 model (http://www.everymac.com/systems/apple/macbook/stats/macbook-core-2-duo-2.2-white -13-late-2007-santa-rosa-specs.html). I have two questions regarding i

  • Disastrous Calendar Issue with IOS 5 upgrade

    I upgraded both my and my wife's iPhone 4's to IOS 5 last night. I did mine first, chose iCloud, and then disabled iCloud when I was told I was over the 5GB limit. I don't have mobileme or anything like that; always backed up to my Windows Vista 4 ma

  • Purchase document, mail output type, name of the sender in title...

    Hello everyone, when a user send a purchase document by mail, the vendor, in the mail title, see the user ID instead if his First+LAST name (field "BNAME" instead of "NAME_TEXT" in the SUO1d, adress part). How can i change that? Thanks a lot for answ

  • Offline payment processing email not being received?

    We just got an event booking today with credit card payment and have yet to receive the secure PDF for processing. Is anyone else having this issue today or in the recent past? I noticed that this occured back in Feb but is it still not fixed? Any cl

  • How to create a vector object

    hi, ok my problem is i am trying to create a vector object in jbuilder with this private Vector<Object> rows; but i keep getting a error saying generics are not supported in 1.2 try -source 1.5. how can i create a vector object in 1.2, i am seriously