Docs

Get started with Subject composition

In this guide we will dive into Subject composition. Subject composition can be extremely useful in the Blockbax platform because it can help define a hierarchy. A hierarchy is defined by selecting the parent types for a subject type, and then populating the relevant parent for a subject. Have a look at our subject type documentation, here you will see a more in-depth explanation of the implications of subject composition with a visual example. Our example will cover the following composition:

Subject type definition:
graph TD B[
Floor
] --> D[
Room
Parent type: Floor] --> F[
Temperature Sensor
Parent type: Room]
Example:
graph TD B(Floor 1) B --> D[Room 1A] D --> F[Temperature Sensor 1A]

Let’s have a look at the steps:


  1. Navigate to your Subject Types overview and create a new subject type
Subjects type
  1. Name the newly created Subject type "Floor" and click on "Create subject type"
Create new type
  1. Create another Subject type "Room"
Create new type
  1. Select "Floor" as the parent type
Select parent type
  1. Create your subject type
Create new type
  1. Navigate back to your Subject overview and create a new subject. Note: Please make sure you create a subject here, and not a subject type
Create new type
  1. Select "Floor" as the subject type
Select Floor
  1. Name the newly created floor "Floor 1" and click on "Create subject"
Select Floor
  1. Create another new subject and select "Room" as subject type. Name the newly created room "Room 1A"
Create Room
  1. Set the parent of the newly created room to "Floor 1" and press "Create subject"
Select parent Room
  1. Congratulations, you’ve just configured the subject composition between 2 new subject types. These newly created subject types don’t have any ingested metrics, but you can of course take it a step further and add another layer of subject composition. Below we’ll repeat the process for an existing subject type in this project namely the "Temperature Sensor".
Subjects overview
  1. Let’s go to Subject "Types"
Subjects types
  1. Open "Temperature Sensor"
Open type
  1. Click "Edit general settings"
Edit settings
  1. Select "Room" as the parent type and save your changes
Select parent type
  1. Go back to our "Subjects" overview
Back to subjects
  1. Select one of the temperature sensor subjects
Select subject
  1. Click here to edit the subject
Edit subject
  1. Set the parent of this temperature sensor to "Room 1A" and save your changes
Edit sensor
  1. Let’s go back to our Subjects overview to see the change in the list
Back
  1. Well done! Now we’ve added another layer to our Subject composition.
List
Congratulations, you have just configured your first subject composition!