Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Variable-depth hierarchy

Variable-depth hierarchy

Variable-depth hierarchy

Hello again,

So now I have a bit more of a difficult problem to solve.  Has anyone had to deal with a variable-depth hierarchy?  I have one as a source and have to load it into a type 2 SCD.  Looking around online, I see references to this but they all seem to only be taught in paid courses.  If anyone can point me to an example or even a template on how to deduce a solution to this recursive problem it would be greatly appreciated!


RE: Variable-depth hierarchy

Last year I had the same challenge to unravel a recursive structure of unknown levels (depth)
In this case the database was on Oracle (actually it was a Business Objects repository) and I wrote a recursive SQL view against it. This view was used as a source for a powwercenter mapping. Performance was pretty bad, it took almost an hour to just read the data.

Some observations:

1. Solving this by using recursive SQL is tricky, every RDBMS has it's own solution and they are not even similar.
Performance may be pretty bad
2. If you known beforehand how many levels can be traced within the table, then you can work around recursive SQL and use sets of unions. (pretty extensive , but certainly possible)
3. It may be possible without an overwrite SQL and by means of sole Powercenter logic, but that is outside my experience.

Ties Blom

RE: Variable-depth hierarchy

Yeah I'm finding that the answer doesn't sound so easy.  If I knew how many levels beforehand, I could use a normalizer transformation.  I'll keep looking around, if I find a solution I'll post it up here.


RE: Variable-depth hierarchy

A normalizer for unraveling a recursive structure? Sounds unsuitable to me. But perhaps I am missing a point.
How would you tackle say a hierarchy 2 levels deep by using a normaliser?

Ties Blom

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close