locked
import denormalised spreadsheet RRS feed

  • Question

  • Hi,

    I am trying to import a denormalised spreadsheet into a normalised data base. Each record is spit across three tables which have FK relationships with each other.

    How can I reference the unique ID of the record in the second table when I am importing data from the same record into table 1 and table 2 at the same time?

    tia,

    eddiec :-)

    Wednesday, May 12, 2010 3:36 AM

Answers

  • You have to populate the parent table first in one Data Flow.  Then in a second Data Flow, you can use the Lookup component to retrieve the ID for the parent row when you fill the child tables.
    Todd McDermid's Blog Talk to me now on
    • Proposed as answer by Eric Wisdahl Wednesday, May 12, 2010 1:52 PM
    • Marked as answer by __pc__ Thursday, May 13, 2010 3:18 AM
    Wednesday, May 12, 2010 5:34 AM

All replies

  • You have to populate the parent table first in one Data Flow.  Then in a second Data Flow, you can use the Lookup component to retrieve the ID for the parent row when you fill the child tables.
    Todd McDermid's Blog Talk to me now on
    • Proposed as answer by Eric Wisdahl Wednesday, May 12, 2010 1:52 PM
    • Marked as answer by __pc__ Thursday, May 13, 2010 3:18 AM
    Wednesday, May 12, 2010 5:34 AM
  • you mentioned ....

    ---- I am trying to import a denormalised spreadsheet into a normalised data base.

    My Question: correct me if i am wrong, what you ment was 3 excel sheets? right? so the data is in 3 different sheet, right?

    ---- Each record is spit across three tables which have FK relationships with each other

    My Question: So you have 3 sheets that are related to each other with keys, right?

    ---- How can I reference the unique ID of the record in the second table when I am importing data from the same record into table 1 and table 2 at the same time?

    My suggestion: i had almost the same scenario, what i did was i imported all the sheets sepretly in staging tables in SQL server and then i handled the joins and the other criteria that i needed.

     

     


    Sincerely SH -- Please kindly don’t forget to mark the post(s) that answered your question and/or vote for the post(s)
    Wednesday, May 12, 2010 1:36 PM