Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Design Tip #17 missing

3 posters

Go down

Design Tip #17 missing Empty Design Tip #17 missing

Post  glenncogar Mon Mar 09, 2015 5:34 pm

I have seen reference to design tip #17 in a number of forum posts (it covers Populating Hierarchy Helper Tables) but when I follow through the links I get a 404 error (not found).

Does anyone know where this design tip has gone? or have a copy?

glenncogar

Posts : 4
Join date : 2015-03-09
Location : Sydney, Australia

Back to top Go down

Design Tip #17 missing Empty Re: Design Tip #17 missing

Post  Nancy Rinn Tue Mar 10, 2015 3:10 pm

Design Tip #17 wasn't written by the Kimball Group so its no longer on our website however Ralph did write a similar article:
http://www.kimballgroup.com/wp-content/uploads/2014/11/Building-the-Hierarchy-Bridge-Table.pdf

I hope this helps!
Nancy

Nancy Rinn

Posts : 23
Join date : 2008-08-18
Location : MN

http://www.kimballgroup.com

Back to top Go down

Design Tip #17 missing Empty Re: Design Tip #17 missing

Post  glenncogar Thu Mar 12, 2015 5:06 am

Thanks Nancy

glenncogar

Posts : 4
Join date : 2015-03-09
Location : Sydney, Australia

Back to top Go down

Design Tip #17 missing Empty Re: Design Tip #17 missing

Post  glenncogar Wed Mar 18, 2015 9:02 pm

Hi again Nancy, in the article you sent me (written by Ralph) the SQL statement at the end includes a

,REPEAT('',LEVEL*5)||LEVEL||'-'||Company_Name AS COMPANY_LOGICAL_TREE

line. I think the REPEAT function is a SQL SERVER feature and I'm using MySQL. I think I can replace it but I don't understand what the REPEAT(...) part is trying to do. If I remove it i.e.

,LEVEL||'-'||Company_Name AS COMPANY_LOGICAL_TREE

then the rows in the output include column values of (for example) 6 - IBM ... where 6 is the LEVEL and IBM is the Company_Name. I understand what that would mean i.e. IBM is the company name of a node at level 6 in the tree structure generated

the REPEAT part would appear to generate a value of LEVEL*5 (=30 in my example) spaces (the value between the ' ' in the REPEAT function). So I guess its creating 'padding' for a visual effect ? Is that correct?

Also, in case anyone else is using MySQL the 'FETCH FIRST ROW ONLY' part of the SQL can be replaced with 'LIMIT 1'

Thanks for any help on this, just want to check my understanding

glenncogar

Posts : 4
Join date : 2015-03-09
Location : Sydney, Australia

Back to top Go down

Design Tip #17 missing Empty Re: Design Tip #17 missing

Post  Nancy Rinn Thu Mar 19, 2015 2:37 pm

Hi glenncogar,
I'm afraid my days of writing/understanding SQL are long passed. Perhaps another Forum member is better qualified to reply to your question.
Fingers crossed,
Nancy

Nancy Rinn

Posts : 23
Join date : 2008-08-18
Location : MN

http://www.kimballgroup.com

Back to top Go down

Design Tip #17 missing Empty Re: Design Tip #17 missing

Post  ngalemmo Thu Mar 19, 2015 2:42 pm

You are correct. The repeat is simply to indent the name to follow the hierarchy.
ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

Design Tip #17 missing Empty Re: Design Tip #17 missing

Post  glenncogar Thu Mar 19, 2015 5:09 pm

Thanks ngalemmo

glenncogar

Posts : 4
Join date : 2015-03-09
Location : Sydney, Australia

Back to top Go down

Design Tip #17 missing Empty Re: Design Tip #17 missing

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum