Combining Data from Multiple Classes

Though you must choose one base data type (or class) for each dashboard, selecting a data type with connections to other classes enables you to configure lenses and filters that combine the data from those classes. This powerful capability can help surface the semantic relationships in your data and enable you to leverage those relationships to access and integrate all of the data in the knowledge graph. When choosing the base data type for a dashboard, it helps to consider all of the desired filters.

For example, consider the following data model for a movie data set:

By creating a dashboard that specifies Movies as the base data type, the lenses and filters in the dashboard can navigate the paths to properties in the other classes, Movie Actors, Movie Directors, Movie Producers, and so on. This topic provides guidance on accessing data from multiple classes in filters and lenses.

Combining Classes in a Lens

The image below shows a dashboard that accesses the graph for the above model. The specified data type is Movies, and a table lens displays all of the columns/properties in the Movies class:

Lenses and filters can be configured to leverage the relationships from the base class to the connected classes. For example, adding a column that navigates the ActedIn path to access the Movie Actors class could be used to display values such as the names of the actors who starred in the movies. To navigate the relationship in the lens Designer, the ActedIn path from the MovieActors class is selected for the new column:

Once the path is chosen, all of the properties from the Movie Actor class are displayed:

Selecting ActorName adds the column to the dashboard. The actors from each movie are now integrated into the lens even though the actor name values are not in the base class.

Filtering on Multiple Classes

In addition to combining classes in lenses, you can also apply filters across classes. Like the example above, the image below shows a dashboard where the specified data type is Movies, and a Table lens displays all of the columns/properties in the Movies class:

A filter can be configured to leverage the relationships from the base class to the connected classes. For example, adding a filter that navigates the Directed path to access the Movie Directors class could be used to display, and filter on, the name of the director for each movie. To navigate the relationship in the Create Filter dialog box, the Directed path from the MovieDirectors class is selected for the Field to filter on:

Once the path is chosen, the properties from the Movie Directors class are displayed:

Selecting the Director Name property and choosing List as the type of filter adds a filter to the dashboard that lists all of the directors in the graph. Users can select particular director names to filter the lens so that it only shows the movies that include one or more of the selected directors.

Using the same path traversal, filters could also be created to narrow the data to certain actors or producers by following the relationships to the Movie Actors or Movie Producers classes. For more information about creating or editing lenses and filters, see Creating a Lens and Working with Filters.