How to do Nested for Multiple objects arrays in Kibana to create the dashboards

Hi All,

Below is the data set in kibana. My requirement is mentioned below for the kibana dashboards.

  1. department wise male & female gender ratio
    2.department wise subject count
    3.department wise age group people

in my database for one lecturer we have multiple objects array so i need to do nested for all the department array to develop the dashboards.

_Id
Lecuturerid
name
phone
dob
gender
department.0.id
department.0.dob
department.0.gender
department.0.name
department.0.subject
department.1.id
department.1.dob
department.1.gender
department.1.name
department.1.subject
department.2.id
department.2.dob
department.2.gender
department.2.name
department.2.subject
department.23.id
department.3.dob
department.23.gender
department.23.name
department.23.subject

How to do it in KIbana?

Regards,
Prabhu

It sounds like you have documents that look like this:

{
  name: "Wylie",
  department: [
    { id: "asdf", name: "History" },
    { id: "qwer", name: "Philosophy" }
  ]
}

This is a valid document, but it is hard to analyze in Kibana. Can you change the way your documents are organized, by creating a single document that represents the data you want to index? For example, each department could have its own documents like:

{
  department_id: "asdf",
  department_subject_count: 5,
  department_gender_ratio: 0.2
}

Basically, I am recommending that you denormalize the data and calculate things before indexing. It sounds like you might be new to Elasticsearch, but you should read about the limitations of arrays in Elasticsearch.

Thanks for your quick response.

Actually in the kibana department I'd, department subject, department gender is coming multiple times as department 0,department 1,like wise it is going up to department 25.

Now how do I merge this column to create the dashboards for like department wise how many male and female.

Now it is very hard to interpret the dataset as it is coming multiple arrays.

Please let me know where to merge this column to create the meaning dashboard

Like I said in my previous comment, you should change the way the documents are stored in Elasticsearch to make them easier to analyze in Kibana.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.