Skip to main content

Ontology Views

The Ontology Views in Timbr enable users to create, manage, and roll back views in a user-friendly manner. Views can be defined on top of the physical tables (unrelated to the Ontology Model), or on the business concepts and their relationships defined in the knowledge graph, or on top of other Ontology Views. Views can include calculations and any data function that the underlying database supports. Views can be cached for optimizing performance and include granular access controls for exposing views to different users with different access permissions.

Ontology Views


Timbr's Views component can be accessed through the Model tab by clicking on Ontology Views. Views can also be accessed through Timbr's SQL Editor by saving the results of queries as views.

There are a few ways and reasons as why to create Views in Timbr. Those reason are:

  • To create a view using the physical tables in the database. This option enables users to import their existing views into Timbr for easier access and control management, together with a full lineage down to the source.
  • To create views on top of the knowledge graph concepts, which enables users to combine aggregations using the knowledge graph relationships.
  • To create views above existing views which enables users to combine aggregations using the knowledge graph relationships, where they can then add them to existing views when done.

Once Ontology Views is clicked on in the Model tab you will be asked to select an existing knowledge graph you wish to create or edit views on.

Ontology Views

Once the Knowledge Graph is chosen, a list of the existing Knowledge Graph views will appear (if any exist).

Ontology Views

Above the list of views on the top left users can switch between knowledge graphs at any time by clicking on the arrow icons to the left of the current knowledge graph name. Beneath the knowledge graph name is the number of existing views in the knowledge graph.

On the top right is + Add new view that when clicked on enables users to add one or more views to the Knowledge Graph.

Beneath the knowledge graph name and + Add new view is a search bar in cases where there are many views to search through.

To the right of the search bar users can find two bulk action buttons.

  • Knowledge Lineage - Opens the Knowledge lineage component for all the selected views on the list.
  • Delete Views - Deletes all the selected views on the list.

There are specific actions that can be performed on each view on the list. Those actions can be seen to the right of each view and its datasource and description, and they include:

The 3 Dots – When clicking on the 3 horizontal dots, a pop-up will appear with the following options:

  • Cache/Uncache Resource – Enables users to cache the data behind the selected view by simply choosing the datasource and output schema to where the resource should be cached. Or instead, uncache a resource if it's already cached.
  • Refresh Cache – Refreshes the cache assigned to the selected view. This will only appear next to views with an existing cache.
  • New Cache Resource – opens a pop-up window to create a new cache for the selected view.
  • Copy Query - Copies the SQL query of the selected view to the clipboard.
  • Manage Tags - Opens a window in order to add or edit the tags of the selected view.
  • Knowledge Lineage - Opens a window presenting the selected views lineage on a graph so users can understand how the view was created and what it's connected to.
  • History - Opens a window with the selected views history, stating when the view was created, edited, and when different actions took place on the view.

Edit View - When the edit view pencil icon is clicked, a window opens enabling users to edit the selected view.

Drop View - When the remove trash can icon is clicked, the selected view will be removed and deleted from the list.

Ontology Views

Cached Views VS. Non Cached Views

Timbr enables users to differentiate between views that are not cached with those that are, by adding a cached logo next to the view name for views that are cached. When hovering over the logo users can see the details of the caching which include Total cached rows, Time and date of caching as well as datasources used in caching.

Ontology Views

Once + Add new view is clicked on the top right, a window will appear similar to the SQL Editor in order for users to enter their SQL statements that will create their view.

Ontology Views

Visual modeling

On the top right users can switch the Creation Method toggle to create the view in a visual manner without the use of SQL.

  1. In the main SQL screen, the first step is to give the view a Name and an optional Description.

Ontology Views

  1. Next, the SQL statement should be entered in the main box. Users can choose their Datasource, Schema and Tables to assist them in building their views.

Ontology Views

  1. Once the SQL statement is prepared, at this stage users can simply click on Save new view on the bottom right, to complete the view and save it.

image

There are additional options before saving the view, which can be found beneath the query box in the query toolbar.

Ontology Views

Those options include:

Run Query - Runs the query in the main query box. This enables users to see what the query results behind the view look like.

Timeout - Determining the query timeout in seconds. When left empty default timeout will be in effect.

Save - When clicked on, a dropdown opens with the 2 following options:

  • Save query - Saves the current query which can later be found in the SQL lab tab under Saved Queries.
  • Map to concept - Enables to map the query results to a chosen concept in the knowledge graph.

Explain Query - This opens an explain query window which presents the query that was pushed down behind the scenes of our current query to the datasource. This enables users to see what their query would look like without Timbr's relationships and business logic, where users would need to write up to 90% more code.

New table name - This enables typing a new table name and saving the query results to the new table being created.

CTAS - Creates a new table using the query results.

Keyboard shortcuts and snippets - Presents various shortcuts and snippets helping users write and run queries faster.

Search for - This enables users to search for specific words or phrases used within the query written above, which can come in handy when writing longer queries.

Replace with - This enables users to replace specific words or phrases used in the query written above with other words or phrases of their choice.

Word wrap - When the word wrap checkbox is marked, word wrap will be activated and any text that exceeds the length of any specific row will be pushed down to the next row. When the word wrap checkbox is unmarked text on any row can continue until specified otherwise.

Query timer - Shows the query run time once run query is clicked.

In the results section below, users are offered additional features which can be found right above the results box on the upper right side.

Ontology Views

These options include:

Filter Results - A search bar to type and filter for specific results.

Hide/Show - Choosing which result columns to hide and which to show.

Explore - Enables to transfer the query results to Timbr's built-in BI module to explore and present the results using any of the various charts offered by Timbr.

More - The more button gives users additional options which include:

  • Remove null columns - Removes all the null columns in the query results.
  • Export result set - Exports the query results as a CSV, JSON or TEXT file.
  • Results Stats - Presents different stats of the query such as total rows, columns, cells, existing values, nulls, query limit, query runtime, query start and end date.
  • Clipboard - Copies the entire results to the clipboard to be used anywhere.
  • Show column stats - Adds stats above the different columns such as unique values, null values, Min, Max, Avg and more.