Why using mappings for building a Knowledge Graph
Benjamin Cogrel, co-founder and CTO of Ontopic. Benjamin has 8 years of practical and research experience in building and deploying Knowledge Graphs. He is also one of the core developers of Ontop, the leading open-source Virtual Knowledge Graph engine.
Learn about the opportunities mappings open for data integration and what we are missing when we don’t use them in the process of building a Knowledge Graph.
If you are designing Knowledge Graphs and not using the mapping approach, you might be missing something.
Data integration projects, building knowledge graphs included, always get to the milestone challenge of combining data from different sources into a semantic layer.
Mappings are great for building semantic layers, which are essentially unified schemas tailored for presenting data to business users in terms they are familiar with.
In this article, you will find an explanation of why mappings are beneficial for your knowledge graph projects.
What Is The Role Of Mappings?
In the case of a relational data source, a mapping connects tables and columns from the data source to the components of the semantic layer; for a Knowledge Graph as a semantic layer, these components are classes and properties.
When you map a table to a class, each row in this table corresponds to an element in the Knowledge Graph.
You can use the same class to map other tables from other data sources, and this way, data is getting integrated. The class can then be used to query data coming from different sources, and you do not need to know where it comes from.
For instance, the user does not need to know that measurements are coming from 125 different tables provided by 32 data providers. Instead, they simply ask for instances of the class Measurement.
Key benefits of the mapping approach
Mappings are a solid foundation for integrating data. They offer three essential benefits to make Knowledge Graph construction more productive and agile:
Trace back data quality issues faster
Mapping is metadata you can search and explore. It contains provenance information, which is key for tracing sources of data quality issues. You want to know if data quality issues come from the data sources or if they have been introduced later in the Knowledge Graph building process.
For example, you observe that the names of persons are not always consistent in your Knowledge Graph, as the surname sometimes appears before the first name.
With a mapping, you can easily search for the definitions of names in your Knowledge Graphs and only keep the ones corresponding to persons (e.g., no organizations and products).
Then you can check them individually to see if the problem lies in the mapping (e.g., the first and surname are concatenated in the wrong order) or comes from the source (e.g., the full name column it provides is not consistently ordered). Previewing data is key for quickly diagnosing these issues.
Without a mapping, tracing data quality issues is more challenging because searching into imperative code is difficult and data previewing is not always possible.
Build a hybrid or a virtual Knowledge Graph
When the Knowledge Graph is built with imperative code, it can only be materialized.
You are basically missing the opportunity to keep the Knowledge Graph virtual, as having a mapping is the foundation of a Virtual Knowledge Graph.
The mapping approach gives you the opportunity to have a hybrid approach to Knowledge Graphs; you can decide which part of your data to materialize into a triplestore and which part to keep virtual.
Deploy on the platform of your choice
When you map with standard mapping syntax like R2RML, you are not bound to a specific platform.
In the case of R2RML (the W3C standard for mapping relational databases to Knowledge Graphs), you have a wide choice of deployment platforms spanning from virtual platforms like Ontop to triplestores and hybrid platforms.
An environment for mapping
With proper environment, the mapping approach will boost productivity when integrating data into large Knowledge Graphs.
At Ontopic, we have developed Ontopic Studio precisely for this purpose. It is an environment where you can design your Knowledge Graph through mappings with no code.
In the next post of this series, you will see a list of key criteria for choosing the mapping solution that suits you the best.
Afterward, you will learn how to build a mapping through the list of the most common patterns.
Register for a trial version of Ontopic Studio and start designing your Knowledge Graph.
Get a demo access of Ontopic Studio
Ready to do mapping with a no-code approach? Let us help you. Get a demo access: