Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this tutorial step, enrich your ontology further by adding a new Freezer entity type. This entity type adds more domain context and introduces properties for time series data, which reflects live operational information.
Important
This feature is in preview.
First, you create the new entity type and define properties without binding them to specific data. Then, you bind the static data to those properties in a separate step. Later, you add time series data to the entity type by creating new properties and binding time series data to them in a single data binding operation.
Note
For both static and time series data, you have the option to create properties without binding data and bind data afterwards, or to create properties and bind data to them in a single step. This article demonstrates both approaches.
Finally, you create a new relationship type to represent the connection between a store and its freezers.
Create Freezer entity type and add properties
Follow these steps to create the Freezer entity type and add properties to it. The properties aren't bound to data yet.
Note
Properties can be created on entity types without binding data to them, and you can bind either static or time series data to them afterwards. This section shows that process. Alternatively, you can bind data to properties while they're being created in a single data binding operation (shown in the next section with time series data).
Select Add entity type from the top ribbon. Enter Freezer for the name of your entity type and select Add Entity Type.
In the Entity type configuration pane, go to the Properties tab. Select Add properties.
Add the following properties and select Save.
Name Value type Property type FreezerIdString Static ModelString Static minSafeTempCDouble Static StoreIdString Static Here's what it looks like before saving:
Select Add entity type key.
Select
FreezerIdas the key value.
Bind static data to properties
Next, bind static data to the properties you created on the Freezer entity type.
In the Entity type configuration pane, go to the Bindings tab. Select Add data to entity type.
For your data source, select the OntologyDataLH lakehouse and the freezer table. Select Next.
Configure a static data binding for the properties.
- For Binding type, leave the default selection of Static.
- Under Bind your properties, the properties you created populate automatically with links to matching columns from the freezer table.
- Select Save.
Now the Freezer entity has static data bound to it.
Bind time series data to additional properties
Next, add time series data on the Freezer entity, by creating new properties and binding time series data to them in a single data binding operation.
Note
Both static and time series data can be bound to properties while they're being created. This section shows that process. Alternatively, you can create properties on entity types without binding data to them, and bind data to them afterwards (shown in the previous section with static data).
In the Entity type configuration pane's Bindings tab, select Add data to entity type.
For your data source, select the TelemetryDataEH eventhouse and the FreezerTelemetry table. Select Next.
Configure a time series data binding.
For Binding type, leave the default selection of Timeseries. For Source data timestamp column, select
timestamp.Under Bind your properties > Static, remove both properties that populate automatically to avoid duplicating the static properties already on the entity.
Then, select + Add static property > Add static property. Select
freezerIdas the Source column and selectFreezerId(beginning with a capital letter) from the dropdown menu in the Property name column. This step ensures that thefreezerIdcolumn in the FreezerTelemetry table is bound to the sameFreezerIdproperty that is already defined on the Freezer entity type from the static data source.Under Bind your properties > Timeseries, the time series columns from the FreezerTelemetry table populate automatically with matching property names for the Freezer entity type. Leave the default selections.
Select Save.
Now the Freezer entity has two data bindings, one with static data from the freezer lakehouse table and one with streaming data from the FreezerTelemetry eventhouse table.
Add relationship type
Finally, create a new relationship type to represent the connection between a store and its freezers.
Create Store operates Freezer
Select Add relationship type from the menu ribbon.
Enter the following relationship type details and select Add relationship type.
- Relationship type name: operates
- Source entity type: Store
- Target entity type: Freezer
The Relationship configuration pane opens, where you can configure additional information. Enter the following details (some fields become visible based on other selections) and select Create.
- Source data: Select your tutorial workspace, the OntologyDataLH lakehouse, and the freezer table.
- Source entity type > Source column: Select
StoreIdto match the entity type key property. - Target entity type > Source column: Select
FreezerIdto match the entity type key property.
Here's what the relationship configuration looks like:
Next steps
Now your ontology includes a Freezer entity type that is connected in the ontology and bound to time series data.
Next, continue to Preview the ontology.