OpenMetadata
Search…
Amundsen
Use the 'metadata' CLI to run a one-time ingestion
Configure and schedule Amundsen metadata workflows using the metadata CLI.

Requirements

Follow this guide to learn how to install the metadata CLI.
In order to execute the workflows, you will need a running OpenMetadata server.

Python requirements

To run the Amundsen ingestion, you will need to install:
1
pip3 install 'openmetadata-ingestion[amundsen]'
Copied!
Note: Make sure you are running openmetadata-ingestion version 0.10.2 or above.

Create Database Services

You need to create database services before ingesting the metadata from Amundsen.
In the below example we have 5 tables from 3 data sources i.e hive, dynamo & delta so in OpenMetadata we have to create database services with the same name as the source.
Amundsen dashboard
To create database service follow these steps

1. Visit the Services Page

The first step is ingesting the metadata from your sources. Under Settings you will find a Services link an external source system to OpenMetadata. Once a service is created, it can be used to configure metadata, usage, and profiler workflows.To visit the Services page, select Services from the Settings menu.\
Navigate to Settings >> Services

2. Create a New Service

Click on the Add New Service button to start the Service creation.
Add a New Service from the Database Services Page

3. Select the Service Type

Select the service type which are available on the amundsen and create a service one by one. In this example we will need to create services for hive, dynamo db & deltalake. Possible service names are athena, bigquery, db2, druid, delta, salesforce, oracle, glue, snowflake, hive .
Service Created
Note: Adding ingestion in this step is optional, because we will fetch the metadata from amundsen.
After creating all the database services, my service page looks like below and we are ready to start with the amundsen ingestion via cli.

Metadata Ingestion

Metadata Ingestion
All connectors are now defined as JSON Schemas. Here you can find the structure to create a connection to Snowflake.
In order to create and run a Metadata Ingestion workflow, we will follow the steps to create a YAML configuration able to connect to the source, process the Entities if needed, and reach the OpenMetadata server.
The workflow is modeled around the following JSON Schema.

1. Define the YAML Config

This is a sample config for Snowflake:
1
source:
2
type: amundsen
3
serviceName: local_amundsen
4
serviceConnection:
5
config:
6
type: Amundsen
7
username: <username>
8
password: <password>
9
hostPort: bolt://localhost:7687
10
maxConnectionLifeTime: <time in secs.>
11
validateSSL: <true or false>
12
encrypted: <true or false>
13
modelClass: <modelclass>
14
sourceConfig:
15
config:
16
enableDataProfiler: false
17
sink:
18
type: metadata-rest
19
config: {}
20
workflowConfig:
21
openMetadataServerConfig:
22
hostPort: http://localhost:8585/api
23
authProvider: no-auth
Copied!

Source Configuration - Service Connection

You can find all the definitions and types for the serviceConnection here.
  • username: Enter the username of your amundsen user in the Username field. The specified user should be authorized to read all databases you want to include in the metadata ingestion workflow.
  • password: Enter the password for your amundsen user in the Password field.
  • hostPort: Host and port of the Amundsen Neo4j Connection.
  • maxConnectionLifeTime (optional): Maximum connection lifetime for the Amundsen Neo4j Connection
  • validateSSL (optional): Enable SSL validation for the Amundsen Neo4j Connection.
  • encrypted (Optional): Enable encryption for the Amundsen Neo4j Connection.
  • modelClass (Optional): Model Class for the Amundsen Neo4j Connection.
For the Connection Arguments, In case you are using Single-Sign-On (SSO) for authentication, add the authenticator details in the Connection Arguments as a Key-Value pair as follows.
"authenticator" : "sso_login_url"
In case you authenticate with SSO using an external browser popup, then add the authenticator details in the Connection Arguments as a Key-Value pair as follows.
"authenticator" : "externalbrowser"

Sink Configuration

To send the metadata to OpenMetadata, it needs to be specified as "type": "metadata-rest".

Workflow Configuration

The main property here is the openMetadataServerConfig, where you can define the host and security provider of your OpenMetadata installation.
For a simple, local installation using our docker containers, this looks like:
1
workflowConfig:
2
openMetadataServerConfig:
3
hostPort: http://localhost:8585/api
4
authProvider: no-auth
Copied!

OpenMetadata Security Providers

We support different security providers. You can find their definitions here. An example of an Auth0 configuration would be the following:
1
workflowConfig:
2
openMetadataServerConfig:
3
hostPort: http://localhost:8585/api
4
authProvider: auth0
5
securityConfig:
6
clientId: <client ID>
7
secretKey: <secret key>
8
domain: <domain>
Copied!

2. Run with the CLI

First, we will need to save the YAML file. Afterward, and with all requirements installed, we can run:
1
metadata ingest -c <path-to-yaml>
Copied!
Note that from connector to connector, this recipe will always be the same. By updating the JSON configuration, you will be able to extract metadata from different sources.