- Denodo Platform
Denodo Platform and data virtualisation in practice
9 minute read
In the previous two articles on Denodo Platform we took a brief look at the whole platform and showed in theory what data virtualisation means and what benefits it brings. Now I would like to apply Denodo Platform to a sample task and demonstrate its possible uses and benefits.

Josef Kotouček

Josef Kotouček
Summary
- We show Denodo Platform in practice through the story of an analyst who has until the next day to count road projects by region from Oracle, PostgreSQL and a code list from the Czech Statistical Office.
- The databases are connected through JDBC, the code list is imported from an .xlsx file, and the tables become base views with more user-friendly derived views on top of them.
- The final output is ten minutes of work, and most of the time goes on guarding against distorted counts when converting lower territorial units to regions.
The task
Our task crystallises from the following story, which takes place one Thursday afternoon in Prague at a company that builds transport infrastructure. It is 15:50 and BI analyst Honza is already counting down the minutes so he can dash home. Unfortunately for him, at 15:51 an e-mail arrives from management saying that by 10:00 tomorrow a report must be ready summarising the number of road projects by region. And not only for Bohemia, but for Moravia as well.
Our analyst knows very well that if the task concerned only Bohemia, he would pull the data from the Oracle database, which holds the project records for this geographical area, and he would be done. Unfortunately it is not that simple, and he has to contact Pavel from the BI department in Brno, where the road projects for Moravia are kept in PostgreSQL.
After a hysterical shock :D, when nobody had expected any task before the end of the week, the two agree that there is no time to copy the data from one database system to the other (essentially ETL with some kind of data pump), and that they will solve everything with Excel files, which they will "slap" together once the outputs are generated. Since Pavel has a date 😊 that he absolutely cannot cancel, they agree that the final output, once the data for Moravia is received, goes to Honza. But when Honza goes through the two Excel files, he finds to his horror that the locations of the road projects are not always at the level of regions, but of other units (municipalities, towns, districts and so on). To make matters worse, PostgreSQL records these units only by code (for example CZ052, which stands for the Hradec Králové Region), without a name. For Honza even to consider that he can achieve the required output, he has to add a name to each code, because otherwise he has no way of identifying in which remote corner of Moravia the roads were actually built.
For better illustration and to verify the final output, we simplify it to just four road projects shown. As the colour coding shows, the rows highlighted in yellow and green are data from the Oracle database. Analogously, the rows highlighted in blue and orange are from PostgreSQL, which lack the names of the locations in column L.

Since the company is just implementing a tool for advanced data analysis based on AI and LLMs, Honza turns to Datera in a time-critical situation (the deadline is tomorrow) to ask whether they have a tool in their portfolio that would help solve such a task. According to the first information, the choice fell on Denodo Platform, which is tailor-made for tasks like this. And if the BI department used this tool, Honza would be done in ten minutes and, as expected, dashing home 😊 This is how fast this task can be solved …
Denodo Virtual DataPort Administration Tool
Before we get to the demonstration of the task itself, it is worth mentioning which tool (the one the individual screenshots come from) we will use to build the solution. It is the Denodo Virtual DataPort Administration Tool, a desktop tool for administering Denodo Platform. The same output can be achieved through Denodo Design Studio, a web application that makes Denodo Platform accessible from anywhere. Last but not least, I should mention that we always carry out the tasks through SQL syntax. Again, the same output can be achieved with drag and drop functionality, where we carry out the individual steps by grabbing, moving and clicking.
Three data sources
Now let us move on to carrying out the task. We know that the final output consists of essentially three data sources. Two are databases (Oracle and PostgreSQL) that hold information on road projects, their lengths, where they were built and so on (simply structured data in normalised form). Since the information on location in PostgreSQL is given only as a code (for example CZ052), a third source is needed, acting as a "translator" of that code into the name of the location (so for CZ052 we can add the Hradec Králové Region). A relevant source of this data is the Czech Statistical Office, from whose website the file struktura_uzemi_cr can be downloaded in .xlsx format (specifically the section Basic territorial code lists in the Czech Republic and the CZ-NUTS classification).

Loading the sources into Denodo Platform
To work with all these sources, we have to load them into Denodo Platform. In the Administration section, the user creates a new database in Denodo Platform's terminology (personally, I would rather describe it as setting up a new project or virtual data pool).

The data sources are then imported into this new database. Since two are standard databases communicating through a JDBC connector, the user selects the option of the same name. They then fill in the details from the database's connection string. As in other tools, they use the test button to verify the connection to both data sources.

Once both data sources are connected successfully, the user has to load the tables so that they can work with them. With the Create base view option, they create an "imprint" of the source tables. When creating them, they can change data types as needed and so fine-tune the "chassis" for the final output.

Since the views are to be used mainly by users at the business level, a user with the necessary rights (or an administrator) uses the selection option to create a so-called derived view. Unlike in the base view, the attributes and names in a derived view can be more user-friendly and so help BI users build the data model itself.

By connecting the data sources and creating base and derived views, we have managed to bring two data sources (Oracle and PostgreSQL) into an imaginary virtual data lake. We will do something similar for the code list of locations (specifically the file struktura_uzemi_cr). Before loading the .xlsx file into Denodo Platform, we upload the file to the file system of the VM (the drop-down menu shows other ways of connecting Excel). Then, through the expandable menu, we find the file on the file system and import it (in effect creating a new data source).

As with the two previous data sources, here too we have to create a base view from the Excel sheet. Once it is saved, we finally have all three data sources, with all the necessary information, in the virtual data lake and can continue working with them.
Analytical work
Once this prerequisite is done (having all three sources virtually in one place), what remains is essentially just analytical work. First we need to "merge" the two tables of road projects, the link tables (containing the ids of projects and locations) and the locations, each into one corresponding view. A simple union all is enough, with which we "join" the relevant derived views in the VQL Shell console.

Next we have to adjust the derived view of the code list of locations to fit the task. That is, although the geographical level (municipality, town, district and so on) at which the location of a road project is entered may differ, the final output must always have the levels transformed to regions, without duplicates.

I will try to explain the last sentence with the example of a project called "Cesta tří krajů" (Road of Three Regions), whose location is given as the Hradec Králové Region, Nový Bydžov, Pardubice and the Central Bohemian Region. At first glance we have two roads built at the level of regions (the Hradec Králové and Central Bohemian Regions) and two more at a lower level (Nový Bydžov and Pardubice, which we need to convert to the level of region). For this reason we create a new view, ciselnik_uzemi_kraje. In it we convert the locations that are not at the level of a region to these higher territorial units. But after transforming Nový Bydžov to the regional level (the Hradec Králové Region) and Pardubice (the Pardubice Region), we get four rows in the database, two of which carry the Hradec Králové Region. If, as the task requires, we performed an operation (using the count function in an SQL query) to count the projects in the regions, for this one project we would get the number 2 for the Hradec Králové Region (in other words, the output would say that two projects were carried out). But we know that is not true (it is still one project, called "Cesta tří krajů" … as a reminder, the output is to contain the number of projects, not the number of roads built in the region). So we also have to deduplicate, so that the output matches reality (that is, the Hradec Králové Region once). A view prepared in this way can then be joined to the views relating to the projects without worrying about the resulting counts in the regions (the outputs will match reality).
Once the above is done, we have the data ready for the final data model. Now we only need either to write an SQL script in the VQL Shell console that joins the necessary views and their attributes, or to use the New -> Join option and again drag and drop the views and select the necessary attributes on them.

Conclusion
All in all, achieving the final output really is ten minutes of work. Essentially the most time goes on realising that the output may be distorted (when converting lower territorial units to the level of region) and on solving this pitfall. The other activities (connecting data sources, creating base and derived views and so on) take a few minutes each.