For the complete documentation index, see llms.txt. This page is also available as Markdown.

Metadata Store

Exploring the Pentaho Data Catalog Metadata Store ..

Metadata Store in Data Catalogs: A Foundation for Effective Data Management

A metadata store within a data catalog serves as a critical repository for storing metadata from various sources, ensuring the preservation of their relationships, historical context, and vital details. Acting as the backbone of a data catalog's architecture, this specialized database is instrumental in streamlining the organization and handling of metadata. This, in turn, significantly aids in the efficient discovery, understanding, and governance of data.

The primary role of the metadata store is to facilitate easy access to the correct data assets for users by encompassing technical, process, and business metadata. This includes comprehensive information on the data's structure, its lineage, utilization patterns, and the business context it operates within. By making data assets readily identifiable, assessable, and actionable, the metadata store plays a pivotal role in bolstering data-driven decision-making processes.

The diagram depicts a simplified representation of the key data model of the PDC Metadata Store (MDS). To understand the relationships between the 'Collections' , it's illustrated in a relational database format.

The model illustrates the relationships between data sources and entities where the customer data assets and discovered metadata properties are persisted as rich JSON graphs.

At the core of the model is the mds.entities collection.

Data Model of Pentaho Data Catalog - Metadata Store (MDS)

Connect to Metadata Store

  1. Run NoSQLBooster.

So what happens when you connect/ingest/profile a datasource?

When you create a data source connection, for example, to the Synthea dataset on PostgreSQL, the details are persisted in the resourceconnections collection located in the fe database.

resourceconnections

If not not familiar with MQL, the easiest way to query the MongoDB database is to use SQL..!

For example, to display the connection name in a dashboard:

resourceName where configMethod = 'credentials'

The following table shows how SQL components map to MongoDB document components.

SQL
MongoDB

database

database

table

collection

column

field

row (record)

document

  1. Run NoSQLBooster.

  1. In the Query panel, enter the following SQL statement.

SQL Query

As expected the result is: postgresql:synthea as there's currently only 1 connection defined.

When you ingest the database schema, the connection details are persisted in the datasources collection located in the mds database.

mds.datasources

The database schema metadata details are persisted in the entities collection (synthea - 179 documents).

In the example below, the zip column properties, from the providers 'table'.

mds.entities

Taking a look at the MDS diagram above we can see that the recursive mds.entities.type refers to:

SCHEMA - synthea

TABLE - 'aggregated' documents

RESOURCE

COLUMN -

This is useful for querying the dataset. The mds.entites collection consists of documents (records) that are referenced by knowing the 'type:'.

  1. Edit the query to retrieve the fields on the 'patients' table (you could have ingested more than 1 schema).

Copy Path
SQL Query - type: 'TABLE' name:'patients'

Notice the out-of-the-box predefined collections for:

  • datapatterns

  • dictionaries

  • dictionaryTerms

The data profiling process generates statistical and intermediate data that is required by other data analytic processes. The intermediate data is consumed by downstream processes such as data flow and foreign key detection.

Referencing the MDS model, the resulting mds.data_profile

The intermediate data generated for each column of data includes:

Profile Action
Description

Roaring Bitset

A bitmap of the hash values for all entries in the column.

HyperLogLog (HLL)

Provides an estimate of the cardinality of the data, with a roughly ~2% margin of error.

Data Pattern Analysis

Performs a rudimentary data pattern analysis using dimensional reduction, tracking the most frequently occurring patterns.

Data Quality Pre-Analysis

Using the Data Pattern Analysis results, Data Catalog performs a statistical estimation of the data quality is performed. This is summarized as an overall percentage as well as a heat map for each data pattern. Additionally, Data Catalog makes RegEx recommendations for the most probable matches.

Statistics

Data Catalog gathers the following statistics when examining all the data:

• Minimum and Maximum values (for numeric columns)

• Widest and Narrowest (non-null) string widths

• Null count

• Total row count

Data Sampling

Data Catalog takes a controlled sampling of the data so that the samples are consistently chosen across different columns.

Taking a look at the MDS diagram above we can see that the recursive mds.entities.type refers to:

SCHEMA - synthea

TABLE

RESOURCE

COLUMN

This is useful for querying the dataset. The mds.entites collection consists of documents (records) that are referenced by knowing the 'type:'.

  1. Edit the query to retrieve the fields for the 'patients.passport' column.

Data Profiling fields for patients.passport column.

The Statistics, Data Patterns and Properties are displayed in the Data Canvas.

Statistics - patients.passport

Obviously .. a lot more data is captured, which is stored in mds.data_profile collection.

  1. Edit the query to retrieve the fields for the 'mds.data_profile.patients.passport' column.

Data Profile - data_profile.passports

x

x

x

x

x

x

x

NoSQLBooster is a cross-platform GUI tool for MongoDB Server 3.6-7.0, which provides a build-in MongoDB script debugger, comprehensive server monitoring tools, chaining fluent query, SQL query, query code generator, task scheduling, ES2020 support, and advanced IntelliSense experience.

x

x

  1. Navigate to the PDC depolyment folder.

  1. Edit docker-compose.yml file.

  1. Uncomment ports under mongodb in docker-compose.yml

  1. Save changes.

  1. Restart PDC.

x

NoSQLBooster
  1. Download NoSQLBooster.

  1. Untar the package.

  1. Move the NoSQLBooster folder to home.

  1. Run NoSQLBooster.

NoSQLBooster
  1. Run NoSQLBooster.

  1. From the Connect option -> Connect From Connection String URI

  1. Enter the following details.

Connection string

mongodb://root:broot@localhost:27017

Connection URI
  1. Finally .. click 'Connect'

Connect to MongoDB

Troubleshooting

When a VM is started up, sometimes not all Docker PDC docker containers start up and as a result some functionality may not work such as:

  • Login page not showing login panel

  • Register Page not creating root user

  • Adding a data source and Test Connection button doesn't work

In this case, navigate to the PDC docker deployment location (/opt/pentaho/pdc-docker-deployment) and run ./pdc.sh up to ensure all PDC containers are running.

MongoDB Compass is a powerful GUI tool that simplifies the processes of querying, aggregating, and analyzing MongoDB data through a user-friendly visual interface.

Compass

Check for the latest package:

  1. Update the Ubuntu system’s repositories.

  1. Download MongoDB compass.

  1. Install MongoDB Compass.

  1. Click on New Connection.

Compass - URI
  1. Click on the Authentication option.

Compass - Authentication
  1. Enter the following details:

Username

root

Password

broot

  1. Click Connect.

Compass - mds.entities

Through the MongoDB Atlas SQL Interface, Connectors, and Drivers, you can leverage your existing SQL knowledge to query and analyze live application data directly from your preferred SQL-based tool.

Link to connectors & drivers for reporting

x

x

Altair is a feature-rich GraphQL client that enables developers to debug and test their GraphQL queries. It provides an intuitive interface for crafting queries, setting variables, and viewing responses.

Altair supports various features like query autocompletion, response formatting, and even documentation exploration, making it an invaluable tool for working with GraphQL APIs.

Altair
  1. To access Altair: http://localhost/graghql2

  2. Enter your query:

Query
Description

query {userCount(filter:{})}

Number of Users

query {userMany(limit:100){ email

date

firstName

lastName

lastLogin

modified

modifiedBy

status

_id }}

Returns User information - Limit 100

The bidb database is structured to allow a JDBC MySQL connection. Useful for creating audit reports.

bidb database

DbVisualizer lets you visualize, manage and edit data with the power of SQL and simplicity of a spreadsheet.

Install Java

  1. Ensure the apt libraries are updated.

  1. Check if Java has been installed.

  1. To see all available editions of OpenJDK.

  1. Install OpenJDK 21 JDK.

  1. Install OpenJDK 21 JRE.

  1. Check installation.


Set the Java environment variables

Although Java is already installed, further configuration is required. Setting a few environment variables makes OpenJDK easier to use and allows other applications to find it.

  1. Edit the .bashrc file in your home directory.

  1. Add the following lines to the bottom of the file.

  1. Save.

  1. Source to apply changes.

  1. Echo JAVA_HOME and PATH to verify they are set correctly.

To set these values for all system users, add the following changes to /etc/environment instead.


Install DbVisualizer

  1. Download the Linux - without Java version.

Download DBVisualizer
DBVisualizer - download
  1. Execute the script located in the Downloads directory.

  1. Accept the default path / settings.

Keep default path
  1. Once 'Finished'. Accept Free license forever.

DBVisualizer UI
  1. To start DbVisualizer.

As we know MongoDB stores the data as a 'Collection' of 'Documents' in a flat hierarchical structure.

The BIDB database contains aggregated documents, useful for reporting.

  1. Start DBVisualizer.

  1. Click on the blue cross to create a new connection.

Create a new database connection
  1. From the drop-down list, select MySQL 5.

MySQL 5
  1. Enter the following details:

Connection Name

BIDB

Database Server

localhost

Database Port

3307

Use SSL

Automatic

Database Userid

root

Database Password

groot

BIDB Connection
  1. Ping the server & Connect.

  2. using SQL Commander, Query the database.

SQL Query

Last updated

Was this helpful?