Skip to main content

Ingest and test Query Engine metadata

In this tutorial, you connect Open Metadata to your Query Engine and bring in its metadata with an ingestion pipeline. At the end, you can browse the Query Engine tables in Open Metadata and check their data quality with tests that run on demand or on a schedule.

Before you begin​

  • An Open Metadata service whose Status is Healthy. See Create an Open Metadata service.
  • The URL, Username, and Password that open Open Metadata, on the Essential Information tab of the service. See View Open Metadata details.
  • A Query Engine service, and an account that can sign in to it. The host and port are in the Public query URL of the Query Engine, in the form <host>:443. See View Query Engine details.
  • If your Query Engine uses Ranger, the basic resource policies of the Query Engine in Ranger. Without them, the connection test in Open Metadata fails. See Sync tags from Open Metadata to Ranger.

Add a Trino database service​

In Open Metadata, your Query Engine is a database service of type Trino.

  1. Go to the URL of your Open Metadata service and sign in with the Username and Password.

  2. In the left menu, select Settings → Services → Databases.

  3. Select Add New Service.

    Databases page of Open Metadata with the Services tab, the list of database services, and the Add New Service button

  4. On the Select Service Type step, select Trino, then select Next.

    Select Service Type step of the Trino Service wizard with the Trino card selected and the Next button

  5. On the Configure Service step, enter a Service Name and a Description, then select Next.

    Configure Service step of the Trino Service wizard with the Service Name and Description fields

  6. On the Connection Details step, fill in the connection fields, as described in the table below.

    Connection Details step of the Trino Service wizard with the Username, Auth Configuration Type, Password, Host And Port, Catalog, and DatabaseSchema fields

  7. Select Test Connection. When every check in the Connection status dialog shows Success, select OK.

    Connection status dialog with Success shown for the CheckAccess, GetDatabases, GetSchemas, GetTables, and GetViews checks

  8. Select Save.

FieldDescription
UsernameRequired. The user that connects to the Query Engine.
Auth Configuration TypeSelect Basic Auth.
PasswordThe password of that user.
Host And PortRequired. The host and port of the Query Engine, in the format hostname:port. Use the Public query URL of the Query Engine.
CatalogOptional. The exact name of the catalog to read metadata from. When it is empty, Open Metadata reads every catalog available through the Query Engine.
DatabaseSchemaOptional. The exact name of the schema to read metadata from. When it is empty, Open Metadata reads every schema available through the Query Engine.

Configure the metadata ingestion pipeline​

A metadata ingestion pipeline pulls the metadata of the service into Open Metadata.

  1. On the Databases page, select the service you created.

  2. Select the Ingestions tab.

  3. Select Add ingestion → Add Metadata Ingestion.

    Ingestions tab of a Trino database service with the Add ingestion menu open and Add Metadata Ingestion highlighted

  4. Enter a Name for the pipeline.

  5. Under Database Filter Pattern, Schema Filter Pattern, and Table Filter Pattern, enter what to include and exclude.

  6. Select Next.

  7. Set the Schedule of the ingestion, or select On demand to run it manually.

  8. Enter the Number of retries.

  9. Select Add & Deploy.

FieldDescription
NameThe name of the pipeline.
IncludesUnder each filter pattern. The databases, schemas, or tables to read metadata from.
ExcludeOptional. Under each filter pattern. The databases, schemas, or tables to leave out.
ScheduleHow often the ingestion runs. On demand runs it only when you start it.
Number of retriesThe number of times the ingestion retries when it fails.

Run the pipeline​

  1. On the Databases page, select your service.

  2. Select the Ingestions tab.

  3. In the row of your pipeline, open the ⋮ menu in the Actions column, then select Run.

    Ingestions tab of a Trino database service with the actions menu of a pipeline open on the Run option

The pipeline runs the ingestion job and pulls the metadata into Open Metadata. A pipeline with a schedule also runs on its own at the times you set.

Explore the tables​

When the ingestion has run, the Query Engine tables appear in Explore.

  1. In the left menu, select Explore.

  2. Under Databases → trino, expand your service, a database, and a schema to list its tables.

    Explore page of Open Metadata with the Data Assets tree expanded to the tables of a Trino schema and the summary of a selected view

  3. Select a table to open it.

    Table page in Open Metadata with the Schema tab listing the columns with their types, tags, and glossary terms

The Schema tab lists the columns of the table. Other tabs show, for example, its Sample Data and Lineage.

Add a test case​

A test case checks the data quality of a table or of one of its columns.

  1. In Explore, open the table you want to test.

  2. Select the Data Observability tab, then select Data Quality.

  3. Select Add Test, then select Table to test the table or Column to test a column.

    Data Quality section of the Data Observability tab with the Add Test menu open on the Table and Column options

  4. Fill in the test case, as described in the table below.

    Add Column test page with the Column, Name, Test type, and Description fields and the Submit button

  5. Select Submit.

The fields of a column test:

FieldDescription
ColumnRequired. The column to test.
NameThe name of the test case, for example order_id not null.
Test typeRequired. The check to run, for example Column Values To Be Not Null.
DescriptionA description of the test case.

Add a test pipeline​

A test pipeline runs the test cases of a table on demand or on a schedule.

  1. In Explore, open the table that has your test cases.

  2. Select the Data Observability tab, then select Data Quality.

  3. Select the Pipeline tab, then select Add.

    Pipeline tab of the Data Quality section with no pipelines yet and the Add button

  4. In Scheduler for Test Cases, enter a Name for the test run schedule.

  5. Select Schedule to run the tests on a recurring schedule, or On Demand to run them manually.

  6. Select the test cases that the pipeline runs.

  7. Select Submit.

When the test pipeline runs, Open Metadata checks the data against your test cases. The Data Quality section of the table shows the results of its tests.

Data Quality section of a table with the Total Tests, Success, Aborted, and Failed counts and the list of test cases with their last run

To see the results for all your tables, select Data Observability → Data Quality in the left menu.

Data Quality page of Open Metadata with the test results of every table, grouped By Tables

Next steps​