Hey everyone !
Welcome back to our data modeling adventure in CDF! In my first post, I tried to explain my understanding of the core concepts - spaces, containers, views, and the elusive knowledge graph. We learned how data models act as the foundation for unlocking the power of Cognite Data Fusion for your industrial data.
This time, let's delve deeper into the world of views and containers - the essential ingredients that bring your data models to life!
Beyond the Fundamentals: Unveiling Views and Containers
Think of a data model as a recipe. It doesn't contain the actual ingredients (data) itself, but it tells you exactly what pre-made dishes (views) and fresh ingredients (containers) to use.
-
Views: The Pre-Assembled Data:
Imagine views as pre-prepared dishes – Views are essentially pre-defined data selections curated from specific containers. These containers hold the raw data (think sensor readings or equipment properties). A single view, akin to a pre-made sauce, can be referenced in multiple data models, guaranteeing consistency across your analysis.
-
Containers: The Customizable Storage Units
Now, let's talk about those containers. Imagine them as empty pots waiting to be filled with your specific data for different instances (like specific pieces of equipment). These containers hold the raw data points, ready to be combined and transformed by your data model (recipe). The beauty lies in their flexibility – you can use the same container type for various purposes, just like a trusty saucepan can be used for simmering sauces or boiling pasta.
Understanding the Nuances: Views vs. Containers
The distinction between views and containers is crucial. Imagine a commercial kitchen: chefs don't cook with raw ingredients directly (like flour or vegetables) – they use pre-prepared dishes for efficiency. Data models function similarly. These models act as recipes, referencing the actual data stored in containers. Containers are like empty pots, ready to hold the essential ingredients to be cooked – sensor readings, equipment properties, and more.
Views, on the other hand, are like pre-defined selections curated from these containers. Think of them as pre-made dishes specifically tailored for your analysis needs. A single view can be referenced in multiple data models, ensuring consistency across your analysis, just like your signature sauce enhances various dishes.
However, deleting a view simply removes the reference, like taking a pre-made dish off the menu. But deleting a container removes the actual data – the fresh ingredients themselves. Remember, a data model itself doesn't store any data; it's the combination of views and containers that brings your industrial data to life.
Why do I sometimes refer to containers as pots and sometimes as ingredients? When a container is created, it functions as an empty pot – essentially a template or blueprint. However, once physical data is defined as instances (nodes or edges), these templates are filled with actual data points. At this stage, I refer to the containers as ingredients.
The Bigger Picture: Unveiling the Knowledge Graph
In our last post, we briefly mentioned the concept of a knowledge graph. Remember our analogy of data models as blueprints? These blueprints aren't just for individual recipes (data models) – they can be used to construct a magnificent feast (knowledge graph). Think of a knowledge graph as a digital representation of your entire industrial ecosystem, where data models act like recipes. And like a feast, it's prepared with the right wines (additional contextual data) paired with sides (supplementary information), and more. Each element contributes to the overall experience, providing a holistic view of your industrial landscape. With data models shaping the structure of this knowledge graph, we gain the power to create insightful analyses that unlock the hidden potential of your industrial processes.
Real-World Example: Factory Assembly Line Performance Analysis
Imagine you run a factory and want to analyze how well your assembly line is performing. To do this, you use data models, containers, and views. Here's how they work together:
1. Data Model: The Blueprint
-
Data Model: This is like a blueprint for analyzing your assembly line. It organizes how you access and interpret your data.
2. Containers: The Storage Units
-
Containers: These are where your data is stored, like a empty pot who can hold several ingredients.
-
Sensor Readings Container: Stores all sensor data, like temperature and pressure readings from your machines.
-
Production Data Container: Holds data on how many units are produced per hour.
-
Equipment Information Container: Contains details about each machine, such as model, age, and maintenance history.
-
3. Views: The pre-pared dishes
-
Views: These are like pre-prepared dishes using ingredients (data) from your containers to serve specific purposes.
-
Machine Performance View: Designed to analyze machine performance.
-
Uses data from:
-
Sensor Readings Container: Grabs the latest sensor readings.
-
Production Data Container: Retrieves production data for the same time period.
-
Equipment Information Container: Pulls details about the machines.
-
-
-
Predictive Maintenance View: Tailored to identify potential equipment failures.
-
Uses data from:
-
Sensor Readings Container: Focuses on readings that might indicate wear and tear.
-
Equipment Information Container: Pulls maintenance history and machine age to assess failure risks.
-
-
-
Views in Action:
-
Efficiency: Views simplify the analysis by combining relevant data, so you don't have to write complex queries every time.
-
Consistency: Using the same views ensures everyone is working with the same data, leading to consistent results.
-
Flexibility: Different views can be created for various analysis needs.
The Journey Continues!
This deeper dive into views and containers has given me a richer understanding of how data models work in CDF. But my journey doesn't stop here! In the next post, I'll explore the exciting world of populating data models and extracting valuable insights from industrial data. Join me as I continue to uncover the full potential of Cognite Data Fusion!
As always, feel free to leave a comment below with any questions or thoughts you might have.
Happy data modeling!
Elka