Sriharsha Chintalapani 80a4399c1a
add required fields for amundsen connection (#9039)
* add required fields for amundsen connection

* Remove unused modelClass field

Co-authored-by: ulixius9 <mayursingal9@gmail.com>
2022-11-30 13:09:57 -08:00

8.0 KiB

title slug
Amundsen /connectors/metadata/amundsen

Amundsen

In this page, you will learn how to use the metadata CLI to run a one-ingestion.

Make sure you are running openmetadata-ingestion version 0.11.0 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.

db-service

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.serv

db-service

2. Create a New Service

Click on the Add New Service button to start the Service creation.

db-service

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 or hive.

db-service db-service

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 the CLI.

db-service

Metadata Ingestion

All connectors are now defined as JSON Schemas. Here you can find the structure to create a connection to Amundsen.

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 Amundsen:

source:
  type: amundsen
  serviceName: local_amundsen
  serviceConnection:
    config:
      type: Amundsen
      username: <username>
      password: <password>
      hostPort: bolt://localhost:7687
      maxConnectionLifeTime: <time in secs.>
      validateSSL: <true or false>
      encrypted: <true or false>
  sourceConfig:
    config: {}

sink:
  type: metadata-rest
  config: {}
workflowConfig:
  openMetadataServerConfig:
    hostPort: <OpenMetadata host and port>
    authProvider: <OpenMetadata auth provider>

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.

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:

workflowConfig:
  openMetadataServerConfig:
    hostPort: 'http://localhost:8585/api'
    authProvider: openmetadata
    securityConfig:
      jwtToken: '{bot_jwt_token}'

Openmetadata JWT Auth

workflowConfig:
  openMetadataServerConfig:
    hostPort: 'http://localhost:8585/api'
    authProvider: openmetadata
    securityConfig:
      jwtToken: '{bot_jwt_token}'

Auth0 SSO

workflowConfig:
  openMetadataServerConfig:
    hostPort: 'http://localhost:8585/api'
    authProvider: auth0
    securityConfig:
      clientId: '{your_client_id}'
      secretKey: '{your_client_secret}'
      domain: '{your_domain}'

Azure SSO

workflowConfig:
  openMetadataServerConfig:
    hostPort: 'http://localhost:8585/api'
    authProvider: azure
    securityConfig:
      clientSecret: '{your_client_secret}'
      authority: '{your_authority_url}'
      clientId: '{your_client_id}'
      scopes:
        - your_scopes

Custom OIDC SSO

workflowConfig:
  openMetadataServerConfig:
    hostPort: 'http://localhost:8585/api'
    authProvider: custom-oidc
    securityConfig:
      clientId: '{your_client_id}'
      secretKey: '{your_client_secret}'
      domain: '{your_domain}'

Google SSO

workflowConfig:
  openMetadataServerConfig:
    hostPort: 'http://localhost:8585/api'
    authProvider: google
    securityConfig:
      secretKey: '{path-to-json-creds}'

Okta SSO

workflowConfig:
  openMetadataServerConfig:
    hostPort: http://localhost:8585/api
    authProvider: okta
    securityConfig:
      clientId: "{CLIENT_ID - SPA APP}"
      orgURL: "{ISSUER_URL}/v1/token"
      privateKey: "{public/private keypair}"
      email: "{email}"
      scopes:
        - token

Amazon Cognito SSO

The ingestion can be configured by Enabling JWT Tokens

workflowConfig:
  openMetadataServerConfig:
    hostPort: 'http://localhost:8585/api'
    authProvider: auth0
    securityConfig:
      clientId: '{your_client_id}'
      secretKey: '{your_client_secret}'
      domain: '{your_domain}'

OneLogin SSO

Which uses Custom OIDC for the ingestion

workflowConfig:
  openMetadataServerConfig:
    hostPort: 'http://localhost:8585/api'
    authProvider: custom-oidc
    securityConfig:
      clientId: '{your_client_id}'
      secretKey: '{your_client_secret}'
      domain: '{your_domain}'

KeyCloak SSO

Which uses Custom OIDC for the ingestion

workflowConfig:
  openMetadataServerConfig:
    hostPort: 'http://localhost:8585/api'
    authProvider: custom-oidc
    securityConfig:
      clientId: '{your_client_id}'
      secretKey: '{your_client_secret}'
      domain: '{your_domain}'

2. Run with the CLI

First, we will need to save the YAML file. Afterward, and with all requirements installed, we can run:

metadata ingest -c <path-to-yaml>

Note that from connector to connector, this recipe will always be the same. By updating the YAML configuration, you will be able to extract metadata from different sources.