Sunday, December 1, 2013

Loading multiple target tables in single interface (mapping) in Oracle Data Integrator

Loading multiple target tables in single interface (mapping) in Oracle Data Integrator

ODI 12c is released and it has the feature of loading mutiple target tables as part of a single interface. Actually interface is termed as mapping in ODI 12c. So i will refer as mapping going forward in this post.

In this post, I will show how to load all rows of source into multiple target tables. And also based on some condition, how to load few rows of source to one target and other rows into other target. It is only the split condition which decides which rows goes to which target table. 

Lets get started.

1. Load Multilple target tables in a mapping

I am going to use the HR.EMPLOYEES table as source and create two new tables to capture sub sets of columns from the employees table. I call emp_basic and emp_advanced. Here are the DDLs for both source and target tables.

Source:

CREATE TABLE "HR"."EMPLOYEES"
  (
    "EMPLOYEE_ID"  NUMBER(6,0),
    "FIRST_NAME"   VARCHAR2(20 BYTE),
    "LAST_NAME"    VARCHAR2(25 BYTE) CONSTRAINT "EMP_LAST_NAME_NN" NOT NULL ENABLE,
    "EMAIL"        VARCHAR2(25 BYTE) CONSTRAINT "EMP_EMAIL_NN" NOT NULL ENABLE,
    "PHONE_NUMBER" VARCHAR2(20 BYTE),
    "HIRE_DATE" DATE CONSTRAINT "EMP_HIRE_DATE_NN" NOT NULL ENABLE,
    "JOB_ID"         VARCHAR2(10 BYTE) CONSTRAINT "EMP_JOB_NN" NOT NULL ENABLE,
    "SALARY"         NUMBER(8,2),
    "COMMISSION_PCT" NUMBER(2,2),
    "MANAGER_ID"     NUMBER(6,0),
    "DEPARTMENT_ID"  NUMBER(4,0),
    CONSTRAINT "EMP_SALARY_MIN" CHECK (salary > 0) ENABLE,
    CONSTRAINT "EMP_EMAIL_UK" UNIQUE ("EMAIL"),
    CONSTRAINT "EMP_EMP_ID_PK" PRIMARY KEY ("EMPLOYEE_ID"),
    CONSTRAINT "EMP_DEPT_FK" FOREIGN KEY ("DEPARTMENT_ID") REFERENCES "HR"."DEPARTMENTS" ("DEPARTMENT_ID") ENABLE,
    CONSTRAINT "EMP_JOB_FK" FOREIGN KEY ("JOB_ID") REFERENCES "HR"."JOBS" ("JOB_ID") ENABLE,
    CONSTRAINT "EMP_MANAGER_FK" FOREIGN KEY ("MANAGER_ID") REFERENCES "HR"."EMPLOYEES" ("EMPLOYEE_ID") ENABLE
  )

Targets:

CREATE TABLE "DATA_TARGET"."EMP_BASIC"
  (
    "EMP_ID"     NUMBER(16,0) NOT NULL ENABLE,
    "FIRST_NAME" VARCHAR2(50 BYTE),
    "LAST_NAME"  VARCHAR2(50 BYTE)
  )

CREATE TABLE "DATA_TARGET"."EMP_ADV"
  (
    "EMP_ID"     NUMBER(16,0) NOT NULL ENABLE,
    "JOB_ID"     VARCHAR2(20 BYTE),
    "SALARY"     NUMBER(16,0),
    "COMMISSION" NUMBER(16,0)
  )

Lets create the mapping in ODI 12c client.


Go to logical tab and drop the source table hr.employees. You can see two employees table instances with name employees and employees1 dropped there. It is because of the manager_id foreign constraint referring to the self table. ODI 12c client represents this constraint as self join here automatically.


Lets drop the two targets data_target.emp_basic and data_target.emp_adv.


Drag and drop the column names from source to target tables to do the mapping.


Lets review the physical tab for KM details. Select each target table in the physical tab to review the IKM and CKM used. As we can see, ODI uses oracle parallel hint to load the target tables which improves performance for appending the data.

You can also see that IKM and CKM are from Global Knowledge modules. By default ODI 12c client has few KM in global KMs.



Lets run the mapping and see the results.


Lets review the target tables data. we see that all rows from source is populated into both tables for different columns.




2. Splitting records into multiple target tables based on condition

Lets try to split rows from source into multiple targets based on some condition. rows which are matching the condition are going into the respective targets. 

Go to the logical tab and delete the lines from source to target and add split components from components.
connect source to split and split to multiple targets. while deleting the existing lines from source to target, odi will still keep the existing mappings.


Click on split component and in the split component properties, define condition in expression section for each target output1 an output2 so that only rows matching this condition from source are loaded to respective target.

The condition I have defined here are 

OUTPUT1 - Default.EMPLOYEES.EMPLOYEE_ID <= 109
OUTPUT2 - Default.EMPLOYEES.EMPLOYEE_ID >   109

so employee_id less than 109 goes to emp_basic table.
employee_id greater than 109 goes to emp_adv table.



Lets run the interface and check the results. Run is successful, lets verify the results in target tables.
emp_basic table has records till employee id 109.


emp_adv table has records from employee_id 110 as expected.






126 comments:

  1. Hi, i have a question about this post: it would possible to handle the loading multiple target tables with a commit only at the end and using the IKM Oracle insert.GLOBAL? Bye

    ReplyDelete
    Replies
    1. Oracle Data Integrator Tutorials: Loading Multiple Target Tables In Single Interface (Mapping) In Oracle Data Integrator >>>>> Download Now

      >>>>> Download Full

      Oracle Data Integrator Tutorials: Loading Multiple Target Tables In Single Interface (Mapping) In Oracle Data Integrator >>>>> Download LINK

      >>>>> Download Now

      Oracle Data Integrator Tutorials: Loading Multiple Target Tables In Single Interface (Mapping) In Oracle Data Integrator >>>>> Download Full

      >>>>> Download LINK 3M

      Delete
  2. Its really great information..Thanks for sharing this informative blog..

    Oracle Training in Chennai

    ReplyDelete
  3. Nice article i was really impressed by seeing this article, it was very interesting and it is very useful for me.. PHP Training in chennai | PHP Training chennai | PHP course in chennai | PHP course chennai

    ReplyDelete
  4. There are lots of information about latest technology and how to get trained in them, like Big Data Training in Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies(Big Data Training). By the way you are running a great blog. Thanks for sharing this. cloud computing training

    ReplyDelete
  5. It is really very helpful for us and I have gathered some important information from this blog.If anyone wants to Selenium Training in Chennai reach Greens Technology training and placement academy.
    selenium Training in Chennai

    ReplyDelete
  6. Latest Govt Bank Railway Jobs Notification 2016

    Hi everyone, it’s my first visit at this site, and post is genuinely fruitful for me, keep up posting these types of articles...................

    ReplyDelete
  7. Thanks for sharing the very useful info about Oracle and please keep updating........

    ReplyDelete
  8. It is really a great work and the way in which u r sharing the knowledge is excellent.Thanks a lot! You made a new blog entry to answer my question; I really appreciate your time and effort.If want become Learn for Java Training to reach us
    Java Training in Chennai | Java Training Institute in Velachery

    ReplyDelete
  9. Great effort. Thanks to shared this informative details with us. Keep updating.
    DBA course syllabus | DBA training courses

    ReplyDelete
  10. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here

    Best Hadoop Training Institute in chennai

    ReplyDelete
  11. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here

    Best Hadoop Training Institute in chennai

    ReplyDelete
  12. Needed to compose you a very little word to thank you yet again regarding..

    Weblogic Server 12cR2 Training

    ReplyDelete
  13. Your new valuable key points imply much a person like me and extremely more to my office workers. With thanks; from every one of us. Digital Marketing Training in Bangalore | Best Digital Marketing Training

    ReplyDelete
  14. Thanks For Sharing Such an valuable Information.

    67500/12

    ReplyDelete
  15. This Blog Provides Very Useful and Important Information. I just Want to share this blog with my friends and family members. digital transformation consulting Thanks for posting.

    ReplyDelete
  16. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    AWS training in Chennai
    selenium training in Chennai

    ReplyDelete
  17. The post is written in very a good manner and it entails many useful information for me. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept.

    java training in chennai | java training in bangalore

    java online training | java training in pune

    selenium training in chennai

    selenium training in bangalore

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete


  19. Wonderful article, very useful and well explanation. Your post is extremely incredible. I will refer this to my candidates...

    angularjs Training in bangalore

    angularjs Training in electronic-city

    angularjs Training in online

    angularjs Training in marathahalli

    ReplyDelete
  20. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    python training in OMR
    python training in tambaram
    python training in annanagar

    ReplyDelete
  21. Have you been thinking about the power sources and the tiles whom use blocks I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post
    python training in chennai
    python training in Bangalore
    Python training institute in chennai

    ReplyDelete
  22. Really you have done great job,There are may person searching about that now they will find enough resources by your post
    selenium training in electronic city | selenium training in electronic city

    ReplyDelete
  23. He always kept chatting about this. I will forward this page to him. Fairly certain he will have a good read. Thank you for sharing.
    industrial safetyu courses in chennai

    ReplyDelete
  24. Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.angularjs online Training

    angularjs Training in marathahalli

    angularjs interview questions and answers

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs online Training

    ReplyDelete
  25. Nice Article,Great experience for me by reading this info.
    thanks for sharing the information with us.keep updating your ideas.
    Android Training in Kelambakkam
    Android Training in Vadapalani
    Android Training in Mogappair
    best android training institute in bangalore

    ReplyDelete
  26. You have provided a nice article, Thank you very much for this. I hope this will be useful for many people. Please keep on updating these type of blogs with good content.Thank You...
    aws online training
    aws training in hyderabad
    amazon web services(AWS) online training
    amazon web services(AWS) training online

    ReplyDelete
  27. Amazing information,thank you for your ideas.after along time i have studied an interesting information's.we need more updates in your blog.
    vmware Training Institutes in Vadapalani
    vmware training near me
    vmware Training in Anna Nagar
    vmware courses in Anna Nagar

    ReplyDelete
  28. Good job!you were given an interesting and innovative information's. I like the way of expressing your ideas and i assure that it will make the readers more enjoyable while reading.
    learn german language in bangalore
    german language in bangalore
    Best German Training Institute in Anna nagar
    German Training Institutes in T nagar

    ReplyDelete
  29. Its a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way. T hank you so much.
    Selenium Training
    Selenium Course in Chennai
    Selenium Training Institute in Chennai
    Best Software Testing Training Institute in Chennai
    Testing training
    Software testing training institutes

    ReplyDelete
  30. Great info. I love all the posts, I really enjoyed,
    nice post and site, good work!
    I would like more information about this, because it is very nice.
    linux training in hyderabad

    ReplyDelete
  31. Resources like the one you mentioned here will be very useful to me ! I will post a link to this page on my blog. I am sure my visitors will find that very useful
    Best Devops online Training
    Online DevOps Certification Course - Gangboard

    ReplyDelete
  32. Hello I am so delighted I found your blog, I really found you by mistake, while I was looking on Yahoo for something else, anyways I am here now and would just like to say thanks for a tremendous post. Please do keep up the great work.
    Data Science Training in Indira nagar
    Data Science training in marathahalli
    Data Science Interview questions and answers
    Data Science training in btm layout | Data Science Training in Bangalore
    Data Science Training in BTM Layout | Data Science training in Bangalore
    Data science training in kalyan nagar

    ReplyDelete
  33. This is an best post. It is Really very informative concept.I like it and help me to development very well.Thanks alot for this brief explanation and very nice information.Oracle Course In Hyderabad

    ReplyDelete
  34. Amazing Article ! I have bookmarked this article page as i received good information from this. All the best for the upcoming articles. I will be waiting for your new articles. Thank You ! Kindly Visit Us @ Coimbatore Travels | Ooty Travels | Coimbatore Airport Taxi

    ReplyDelete
  35. Thanks For Sharing Your Information The Information Shared Is Valuable Please Keep Updating Us Time Went On Just Reading The article OracleTraining In Hyderabad

    ReplyDelete
  36. All are saying the same thing repeatedly, but in your blog I had a chance to get some useful and unique information, I love your writing style very much, I would like to suggest your blog in my dude circle, so keep on updates.
    apple iphone service center in chennai | imac service center in chennai | ipod service center in chennai | apple ipad service center in chennai

    ReplyDelete
  37. This is certainly a best blog ’s.I have never seen such a lot of information with a Step-By-Step guidining manner.I have never seen such a successful blog.
    Authorized iphone service center in Chennai | iphone service center in chennai | Mobile service center in chennai | Authorized iphone service center in Chennai | iphone service center in chennai

    ReplyDelete

  38. Information from this blog is very useful for me, am very happy to read this blog Kindly visit us @ Luxury Watch Box | Shoe Box Manufacturer |  Candle Packaging Boxes

    ReplyDelete
  39. thank you for sharing such a nice and interesting blog with us. i have seen that all will say the same thing repeatedly. But in your blog, I had a chance to get some useful and unique information. I would like to suggest your blog in my dude circle. please keep on updates. hope it might be much useful for us. keep on updating...
    Devops training in Chennai | Devops training Institute in Chennai

    ReplyDelete
  40. This post is really nice and pretty good maintained.
    Data Science Training in chennai

    ReplyDelete
  41. The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. Machine Learning Final Year Projects In case you will succeed, you have to begin building machine learning projects in the near future.

    Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.


    Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.

    ReplyDelete
  42. Amazing Post. Your writing is very inspiring. Thanks for Posting...
    Digital Marketing Courses in Bangalore

    ReplyDelete
  43. Excellent content thanks for sharing the unique information and keep posting...
    digital marketing training in bangalore

    ReplyDelete
  44. I am impressed. I don't think Ive met anyone who knows as much about this subject as you do. You are truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. Really, great blog you have got here
    BCOM 1st,2nd & Final Year Exam TimeTable 2020
    Delhi University BCOM 3rd Year TimeTable 2020
    RU BCOM Second Year Exam Datesheet 2020

    ReplyDelete
  45. When I originally commented I seem to have clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I recieve 4 emails with the exact same comment. TechnologyIs there a way you can remove me from that service? Cheers!

    ReplyDelete
  46. Thanks for sharing the codes. Appreciate the illustration with images

    ai training in indore

    ReplyDelete
  47. Thank you for sharing such a really admire your post. Your post is great!
    data science course in Hyderabad

    ReplyDelete
  48. That great posting and too its very help full article for me. thanks for sharing your information.
    Germany VPS Server Hosting

    ReplyDelete
  49. Thanks for sharing this information. I really Like Very Much.
    best devops online training

    ReplyDelete
  50. Mindblowing, This is an amazing superb article Keep Sharing this...
    Thanks a lot!!!!

    Germany VPS Hosting

    ReplyDelete
  51. Looking for JOB in core industry? We're offering additional discount on early enrollment on full module Automation Training. Certificate will be given to those who completed their training and also get 100% Job assistance(Life Time).Call 9953489987, 9711287737.

    ReplyDelete
  52. I have bookmarked your website because this site contains valuable information in it. I am really happy with articles quality and presentation. Thanks a lot for keeping great stuff. I am very much thankful for this site.
    360DigiTMG artificial intelligence course in ecil


    ReplyDelete
  53. this blog was really great, never seen a great blog like this before. i think im gonna share this to my friends..
    business analytics course

    ReplyDelete
  54. The most unique and creative TIC tee I have seen in a while. My Boxer has been
    Buy snapchat account wearing them ever since he was a pup and now is older and ready to take on the competition with a T-shirt that says: Most Unique Tecnic I Learn. It makes me laugh when I see his run-up to the dog crate and out there with his shirt off. He usually does this about three times, then goes back into his crate to snooze for about five or six hours before going to sleep. If you have a dog who loves to exercise and is always ready to play, then this tee would be a good choice for him.Buy pinterest accounts

    ReplyDelete
  55. The question is, why would anyone want to put up a nice blog in the first place? Is it just to impress people or do they have some kind of business Buy pinterest accountsbehind the nice blog? Well, I believe you should take a look at how these two factors play into your decision on whether or not to set up a nice blog. The more you know before you get started the better chance you have at success with your new site.Buy instagram accounts

    ReplyDelete
  56. Cool stuff you have and you keep overhaul every one of us, Great work.
    pmp certification

    ReplyDelete
  57. Study Amazon Web Services for making your career as a shining sun with Infycle Technologies. Infycle Technologies is the best AWS training institute in Chennai, providing complete hands-on practical training of professional specialists in the field. In addition to that, it also offers numerous programming language tutors in the software industry such as Oracle, Python, Big Dat, Hadoop, etc. Once after the training, interviews will be arranged for the candidates, so that, they can set their career without any struggle. Of all that, 200% placement assurance will be given here. To have the best career, call 7502633633 to Infycle Technologies and grab a free demo to know more.
    No.1 AWS Training Institute in Chennai | Infycle Technologies

    ReplyDelete
  58. Excellent effort to make this blog more wonderful and attractive.
    data science course

    ReplyDelete
  59. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work
    data scientist course

    ReplyDelete
  60. This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it,
    business analytics course in hyderabad

    ReplyDelete
  61. Impressive. Your story always bring hope and new energy. Keep up the good work.
    data science training in malaysia

    ReplyDelete
  62. A good blog always comes-up with new and exciting information and while reading I feel that this blog really has all those qualities that qualify a blog to be one.
    business analytics training in hyderabad

    ReplyDelete
  63. Oracle Data Integrator Tutorials: Loading Multiple Target Tables In Single Interface (Mapping) In Oracle Data Integrator >>>>> Download Now

    >>>>> Download Full

    Oracle Data Integrator Tutorials: Loading Multiple Target Tables In Single Interface (Mapping) In Oracle Data Integrator >>>>> Download LINK

    >>>>> Download Now

    Oracle Data Integrator Tutorials: Loading Multiple Target Tables In Single Interface (Mapping) In Oracle Data Integrator >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete
  64. But, if source and target at different stage? for example, from oracle to Flate File.

    ReplyDelete
  65. great post , learn things from your blog thanks for this information. Are you intresting in code developer then checkout java classes in satara

    ReplyDelete