Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 172491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:10:31+00:00 2026-05-11T13:10:31+00:00

I have a table in my source DB that is self referencing |BusinessID|…|ParentID| This

  • 0

I have a table in my source DB that is self referencing

|BusinessID|…|ParentID|

This table is modeled in the DW as |SurrogateID|BusinessID|ParentID|

First question is, should the ParentID in the DW reference the surrogate id or the business id. My idea is that it should reference the surrogate id.

Then my problem occurs, in my dataflow task of SSIS, how can I lookup the surrogate key of the parent?

If I insert all rows where ParentID is null first and then the ones that are not null I solve part of the problem.

But I still have to lookup the rows that may reference a parent that is also a child.

I.e. I do have to make sure that the parents are loaded first into the DB to be able to use the lookup transformation.

Do I have to resolve to a for-each with sorted input?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:10:32+00:00Added an answer on May 11, 2026 at 1:10 pm

    One trick I’ve used in this situation is to load the rows without the ParentID. I then used another data flow to create an update script based on the source data and the loaded data, then used a SQL task to run the created update script. It won’t win prizes for elegance, but it does work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a 3 tables that look like this: (source: InsomniacGeek.com ) On the
I have a form with a table source, the form has a few fields
I have two tables: a source table and a target table. The target table
I have a table representing values of source file metrics across project revisions, like
I have a simple gridview and SqlData source to bind data table to gridview.
I have a Data Class called MyTable, and the source property is TABLE (table
I have a table based off Sam's Teach Yourself iOS Development's FlowerViewController , that,
I have a table with data that needs to be updated at run-time by
This should be a very basic question, I'm still new to ruby so i'd
There's a table Category with a pk idCategory and a self-referencing foreign-key fiCategory .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.