I have denormalized data (coming from a file) that needs to be imported into parent-child tables. The source data looks something like this:
Account
What are the parts, parts or tactics of SSIS that I should use to read the first three columns in the parent table and the fourth column (email) in the child table? I have several options for the parent key that I am allowed to:
- Use account # directly as primary key
- Use the surrogate key generated by SSIS during the import process.
- Configure Primary Identity Key
I am sure that I have listed my main key parameters in increasing order of complexity. I would be interested to know how to make the first and last option - I will conclude how to achieve the middle option. To emphasize again, I am interested in a decisive SSIS solution; I am looking for an answer that uses SSIS, not a procedural, technological neutral answer.
My question is somewhat similar to another SO question having an answer of uncertain viability. I hope a more detailed guide can be given. I already know how to solve this problem by creating an “intermediate” intermediate stage, where the separation between parents and children is actually processed by direct SQL. However, I wonder how this can be done without such an average step.
It seems to me that such an import would be so widespread that there would be a well-published boilerplate way to handle this - a method that SSIS has. So far, I do not quite understand the answer to this question.
Update #1 . Based on the comments, I adjusted the sample data to be more clearly denormalized. I also removed the “flat” from the “flat file” so that the semantics do not interfere with the question.
Update #2 . I have increased my interest in the solution used in SSIS.
source share