All articles
  • Denodo Platform

Denodo Platform from Datera always comes with something extra

6 minute read

As promised in the previous blog post on Denodo Platform, the next few articles will focus on practical demonstrations of working in the tool. The aim is not only to show technically how to "click through" a particular process to a successful end, but rather to demonstrate examples from real practice and how Denodo Platform solves them.

Josef Kotouček

Summary

  • For users with different levels of knowledge of databases and BI, we prepared helper views on one project that make it easier to build data models in Denodo Design Studio.
  • The helper view translator converts the names of classes and attributes between base and derived views, so users can find the original name without knowing SQL.
  • Missing relationships between tables are handled by associations: when a join is created, the relationship between the views appears on its own, and SQL users find the keys in another helper view.

In general, applying a platform or its components as a solution to a customer's technical requirement is often not that difficult. What is often harder is getting the user and application side right, that is, getting users to work with the tool not because they have to (an instruction from management along the lines of "it cost a fortune, so you will work with it, full stop") but because they see the added value for their work, hand in hand with easier everyday, routine and repetitive tasks. In this spirit we approached the implementation of a solution on one project, because meetings with the customer showed that users had different levels of knowledge and experience with databases, database tools and BI in general. For them we prepared several "helper" views that make it easier to build data models in Denodo Design Studio (one of the components of Denodo Platform).

From the introductory blog post we already know what Denodo Platform is for, so it is not difficult to connect several data sources (JDBC, ODBC, .xlsx and so on) and start working with them as a Data Lake. After a source is connected, the admin makes the so-called base or derived views, in Denodo's terminology, available for your account or role (a separate blog post will cover this topic, and the technical differences between the types of view will be dealt with in one of the later posts), and that is basically where their work ends. But how do you make work in a new tool easier for users, given the customer's requirements, when classes and attributes were to be renamed for the derived view, or different data sources were to be linked in order to enrich the original reports?

Translating names between base and derived views

The customer's first requirement (mentioned above) was basically a translation: at the level of the base view, classes and attributes are kept in technical terminology (for example kod), but for BI purposes they are renamed (translated) into a more user-friendly form (for example projekt). This applied not only to attributes but also to individual classes. If users of the BI platform have access to both derived and base views, they will logically run into the question of which attribute in one view corresponds to which in the other. Another example is when you connect another source that has a table with an attribute kod, while users work with the derived view, where the attribute is already called projekt, and the names do not match. You need to find out the original name so that you can at least in theory say that a join between tables from different sources made on these columns makes sense by name and will return meaningful output. Of course, even if the names match, the attributes may not form a primary and foreign key in terms of content, so you have to keep looking.

Missing relationships between tables

Primary and foreign keys can be another problem. If the source itself is not well prepared, the relationships between tables will not be loaded when the tables are imported. You then have a pile of tables "in one place" in Denodo Platform (specifically in Virtual DataPort), but the primary and foreign key relationships across the tables are not known. BI users, whose task is to build data models, feel this most. Data models are overwhelmingly built by joining several tables, that is, by the right combination of two attributes (the primary and foreign key). The problem is multiplied if you want to join tables across data sources. How is the user supposed to know which ID relates to which one in another data source?

Setting aside the fact that finding the right columns for a relationship between tables from different data sources (if such an option can be found at all) usually requires a methodologist who gives a thumbs-up to the choice of attributes, missing relationships between tables can be solved in Denodo Platform simply by using so-called associations. It is up to the user whether to create associations by drag and drop or by implementing a script in the VQL Shell console. It is always a good idea to do this after connecting a data source, because although creating associations takes some time at first, it pays back in how easily other users can build a data model from several tables.

The helper view translator

Enough theory; let us look at a practical solution to both problems. For the first task, we built a helper view that is essentially a translator from base to derived view and the other way round. Common to the solution of the second task as well is a way of using it that does not require knowledge of SQL. The user opens the prepared view translator and fills in a text field with the view or specific attribute they are looking for. After clicking the Execution panel button, a row is returned containing the name of the base/derived view and the attribute you are looking for in both views.

VQL Shell in Denodo with a query on the translator view, which returns the original attribute kod from the base view for the attribute projekt from the derived view

A more experienced user (or one who likes writing SQL syntax) can achieve the same output by entering the names of the base/derived view and attributes in a script in the VQL Shell console. Since this is standard SQL script syntax, everything needed goes into the WHERE clause. The output is then (logically) identical to the drag and drop method.

The helper view translator in Denodo Design Studio, with its schema and the result of a query from the Execution panel

Associations when creating a join

Once users can find their way around the naming of attributes (their translation), they logically move on to linking data sources and classes. Creating associations helps them build data models by drag and drop. If the user clicks the view projekt_blog in the tree menu on the left and selects join, all the other views to which an association leads (here, kraje) are shown automatically.

Denodo Design Studio with the New menu and the Join option for the projekt_blog view, and the associated view kraje

Then all that is needed is to pick up the chosen view and drag it onto the "workspace". The relationship between the views (a line connecting the two) is shown (filled in) for the user automatically. The tool is convenient for users, with no needless searching for whether any relationship between the views exists at all, and so the work invested in creating the associations pays back. It is, of course, up to each user whether to keep working with the association, add a condition to it, or delete it and create a new relationship.

Join model in Denodo Design Studio, where the views projekt_blog and kraje link themselves with a relationship

A helper view for SQL users

But how do we make work easier for users who write SQL scripts and do not want to look for the relationship through a join and the graphical display of the association with its keys identified? Here too we built a helper view, based on the associations already created. The user then only has to write both view names in the WHERE clause, and the id from each view that serves as the primary and foreign key is returned.

VQL Shell in Denodo with a query on the helper view asociace, which returns the keys id and id_projekt for the views projekt_blog and kraje

Get in touch

A few sentences about what you are working on will help us prepare.

We describe how we handle personal data in our privacy policy.

You can also call us on +420 228 227 418 or email us at info@datera.cz.