# Parent Child link in dashboard

**URL:** <https://discuss.elastic.co/t/parent-child-link-in-dashboard/39786>\
**Category:** Kibana\
**Created:** [January 21, 2016, 2:40pm UTC](https://discuss.elastic.co/t/parent-child-link-in-dashboard/39786 "2016-01-21T14:40:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![warper](https://avatars.discourse-cdn.com/v4/letter/w/4da419/32.png) [@warper](https://discuss.elastic.co/u/warper)\
**Post date:** [January 21, 2016, 2:40pm UTC](https://discuss.elastic.co/t/parent-child-link-in-dashboard/39786/1 "2016-01-21T14:40:24Z")

</div>

Hello everyone

I have a parent child relationship in my data and on my dashboard I would like to display the parents in a data table and below it I would like to display the children related to that parent.

How can I achieve this ? I'm looking for a way to pass the parent id down to the children table and filter that table to show just the child records belonging to that parent. Or any other way that someone can suggest doing this.

Thank you for your help

---

<div class="post-metadata">

**Author:** ![BigFunger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigfunger/32/7323_2.png) [@BigFunger](https://discuss.elastic.co/u/BigFunger)\
**Post date:** [January 21, 2016, 3:57pm UTC](https://discuss.elastic.co/t/parent-child-link-in-dashboard/39786/2 "2016-01-21T15:57:06Z")

</div>

@warper can you post a sample of your data? Ideally you would generate a script in the format for submitting a bug to the [elasticsearch repo](https://github.com/elastic/elasticsearch/blob/master/CONTRIBUTING.md#bug-reports) so that I can quickly recreate it in my environment.

Also, are you embedding the dashboard into another page that you control, or are you operating entirely within Kibana?

Thinking ahead, are you open to changing the way that the data is structured at index time to make this easier?

---

<div class="post-metadata">

**Author:** ![warper](https://avatars.discourse-cdn.com/v4/letter/w/4da419/32.png) [@warper](https://discuss.elastic.co/u/warper)\
**Post date:** [January 21, 2016, 9:29pm UTC](https://discuss.elastic.co/t/parent-child-link-in-dashboard/39786/3 "2016-01-21T21:29:42Z")

</div>

Hey Jim, sorry for the delay. I'm adding a simple data structure that I'm trying to do this with so you can create it in your environment.

I just want to use ii in Kibana, no other dashboard involved.

I don't really mind changing my data structure at all this just seemed to be the right way of doing it. Let me know if you need more information. Thank you for your help

PUT library  
{  
"mappings": {  
"books": {  
"\_all": {"enabled": false},  
"properties":{  
"title":{"type": "string"},  
"name":{  
"type":"nested",  
"properties":{  
"first":{"type":"string"},  
"last":{"type":"string"}  
}  
},  
"publish\_date":{"type":"date"},  
"price":{"type":"string"}  
}  
},  
"reviews":{  
"\_parent": {  
"type": "books"  
},  
"properties": {  
"points":{"type":"integer"},  
"reviedate":{"type":"date"}  
}  
}  
}  
}

PUT /library/books/1  
{  
"title": "A Fly On The Wall",  
"name" : {  
"first":"James",  
"last":"Sanders"  
},  
"publish\_date":"2015-06-21T23:39:49-0400",  
"price": "19.19"  
}

PUT /library/books/2  
{  
"title": "A New World",  
"name" : {  
"first":"Sandra",  
"last":"Jones"  
},  
"publish\_date":"2015-06-21T23:39:49-0400",  
"price": "21.19"  
}

PUT /library/reviews/1?parent=1  
{  
"points" : 6,  
"reviedate" : "2015-06-21T23:39:49-0400"  
}

PUT /library/reviews/2?parent=1  
{  
"points" : 4,  
"reviedate" : "2015-06-22T23:39:49-0400"  
}

PUT /library/reviews/3?parent=1  
{  
"points" : 9,  
"reviedate" : "2015-06-23T23:39:49-0400"  
}

PUT /library/reviews/4?parent=2  
{  
"points" : 5,  
"reviedate" : "2015-06-21T23:39:49-0400"  
}

PUT /library/reviews/5?parent=2  
{  
"points" : 7,  
"reviedate" : "2015-06-22T23:39:49-0400"  
}

---

<div class="post-metadata">

**Author:** ![BigFunger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigfunger/32/7323_2.png) [@BigFunger](https://discuss.elastic.co/u/BigFunger)\
**Post date:** [January 22, 2016, 9:42pm UTC](https://discuss.elastic.co/t/parent-child-link-in-dashboard/39786/4 "2016-01-22T21:42:57Z")

</div>

Is this the extent of the data structure that you are indexing, or did you simplify it for this example? Is there any reason why you can't index the book details along with the review? That would make it simple to accomplish what you wanted in a single dashboard.

---

<div class="post-metadata">

**Author:** ![warper](https://avatars.discourse-cdn.com/v4/letter/w/4da419/32.png) [@warper](https://discuss.elastic.co/u/warper)\
**Post date:** [January 28, 2016, 3:34pm UTC](https://discuss.elastic.co/t/parent-child-link-in-dashboard/39786/5 "2016-01-28T15:34:01Z")

</div>

I simplified the data for the example. The intend of the review is to keep on growing as new reviews come in for the book I would just like to add them. The real world application of this would be history of a status change and the data the status changed. Thank you for looking at this

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:04pm UTC](https://discuss.elastic.co/t/parent-child-link-in-dashboard/39786/6 "2017-07-06T14:04:02Z")

</div>


