Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable-depth hierarchy

Status
Not open for further replies.

glenpark

Programmer
Oct 6, 2006
21
US
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!

Thanks,
Glen
 
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

 
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.

Thanks
 
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top