Intro to the Knowledge Graph
What is a Knowledge Graph?
A Knowledge Graph is a version-controlled semantic model of a dataset, which is used by Veezoo to understand your question and generate the correct SQL query that answers it.
It is represented as a set of files using a modelling language called VKL, the Veezoo Knowledge Language. The Veezoo Knowledge Language is a semantic modelling language that is based on SQL, allowing you to model and document your data in a way that business users and Veezoo can understand.
Let's go over a simple example to explore the basics of VKL and how you can use it to answer your questions.
An Example
Let's say you are a data analyst at Hitchhiker, a small sci-fi movie e-commerce website, and you have the following flat table, called ORDERS.
id | customer_id | customer_firstname | customer_lastname | country | movie | date | returned |
---|---|---|---|---|---|---|---|
1000 | 1 | Till | Haug | CH | The Hitchhiker's Guide to the Galaxy | 2020-10-29 | yes |
1001 | 2 | Albert | Einstein | DE | Clockwork Orange | 2019-08-09 | no |
1002 | 1 | Till | Haug | CH | 2001: A Space Odyssey | 2020-10-30 | no |
1003 | 3 | Michael | Jackson | US | Interstellar | 2020-09-20 | no |
You want to make it available to your manager in an easy way, so you can work on some cool prediction models, instead of answering his reporting questions.
Thankfully, you have Veezoo.
You open Veezoo, go to Veezoo Studio and connect it to this flat table on your PostgreSQL database. In 1 click, Studio creates the following Knowledge Graph for you.
hitchhiker
├── database
│ └── postgres
│ └── movie_db
│ ├── database.vkl
│ └── ORDERS
│ └── table.vkl
└── knowledge-base
└── classes
└── Order
├── entities
| ├── Country.vkl
| ├── Customer.vkl
| └── Movie.vkl
└── class.vkl
Now, first of all: Don't Panic!
We will explore together the essence of this Knowledge Graph layer-by-layer, so you can get quickly up and running.
The Knowledge Graph is divided into different layers. We will focus here on the two most important ones: knowledge-base
and database
layers.