Documentation

How-to guides / Get started with Subject composition

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 overview

2. Click "Types"

3. Create a new subject type

4. Name the newly created Subject type "Floor" and click on "Create subject type"

5. Navigate back to your Subject overview

6. Click "Types"

7. Create a new subject type

8. Name this new subject type "Room" and proceed to select your parent type.

9. Select "Floor" as the parent type.

10. Create your subject type.

11. Navigate back to your Subject overview.

12. Click to create a new subject. Note: Please make sure you create a subject here, and not a subject type.

13. Select "Floor" as the subject type.

14. Name the newly created floor "Floor 1" and click on "Create subject".

15. Click to create another new subject

16. Select "Room" as the subject type

17. Name the newly created room "Room 1A" and click on "Create subject".

18. Set the parent of the newly created room to "Floor 1"

19. Create your subject

20. 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".

21. Click "Types"

22. Click "Temperature Sensor"

23. Click "Edit general settings"

24. Click here.

25. Click "Room"

26. Save your changes.

27. Click "Subjects"

28. Select one of the temperature sensors

29. Click here to edit the subject.

30. Set the parent of this temperature sensor to Room 1A.

31. Save your changes

32. Well done! Now we've added another layer to our Subject composition.

Congratulations, you have just configured your first subject composition!