Amundsen

repository·main·Indexed 26 days ago

https://github.com/amundsen-io/amundsen

A data discovery and metadata engine that provides a searchable index of data resources such as tables, dashboards, and streams. The project includes Amundsen Databuilder, a modular ETL framework for data ingestion from sources like Postgres, Redshift, MSSQL, MySQL, Db2, Snowflake, and BigQuery, as well as Helm charts for deploying the stack on Kubernetes with components including Elasticsearch, Neo4j, and OIDC authentication.

Tokens
94.9K
Snippets
222
Records
560
Agent score
86%

What's inside Amundsen

  1. Overview of Amundsen Frontend Service

    main

    The Amundsen Frontend Service is a metadata-driven application designed to improve productivity for data analysts, scientists, and engineers. It acts as a 'Google search for data' by indexing data resources like tables, dashboards, and streams, and providing search results based on usage patterns (e.g., ranking highly queried tables higher).

    Technically, it is a Flask application with a React frontend that interacts with two other core services:

    1. Search Service: Enables users to search for data resources.
    2. Metadata Service: Allows users to view and edit metadata for specific resources.
  2. Overview of Amundsen components

    main

    Amundsen is a data discovery and metadata engine composed of several microservices and libraries:

    • amundsenfrontendlibrary (frontend): A Flask application with a React frontend for the user interface.
    • amundsensearchlibrary (search): A search service leveraging Elasticsearch to power metadata searching in the frontend.
    • amundsenmetadatalibrary (metadata): A metadata service using Neo4j or Apache Atlas as a persistent layer.
    • amundsendatabuilder (databuilder): A data ingestion library used to build the metadata graph and search index. It can be used via Python scripts or Airflow DAGs.
    • amundsencommon (common): A library containing shared code used across Amundsen microservices.
    • amundsengremlin: A library for converting model objects into Gremlin vertices and edges, used for AWS Neptune backends.
    • amundsenrds: Contains ORM models to support relational databases as a metadata backend store.
  3. Overview of Amundsen Databuilder

    main
    Amundsen Databuilder is a data ingestion library inspired by Apache Gobblin. It is an ETL (Extract, Transform, Load) framework designed to build data for Amundsen. It can be used within orchestration frameworks like Apache Airflow or as standalone Python scripts. The framework is highly modular and uses namespace-based HOCON configuration, allowing components like transformers and extractors to be reused and plugged into different parts of the pipeline.
  4. Understand the Query Metadata schema

    main

    Amundsen ingests query metadata and query composition metadata using four distinct components. To provide a complete view of query usage and structure, you must ingest these four parts:

    1. QueryMetadata: Represents the actual query text/definition.
    2. QueryExecutionsMetadata: An aggregation representing the frequency of a query's execution over specific time windows (e.g., per hour, day, or week).
    3. QueryJoinMetadata: Represents a join operation between two specific columns.
    4. QueryWhereMetadata: Represents a WHERE clause used in a query, which may be associated with one or more columns and tables.

    Amundsen relies on QueryExecutionsMetadata to manage time-sensitive relevance. As new execution metadata is added and old records are removed, Amundsen automatically updates which queries, joins, and where-clauses remain relevant in the system.

  5. Understand the Amundsen Frontend Vision and Roadmap

    main

    The Amundsen frontend is undergoing a strategic transition from a custom React application built on top of Flask to a modern, independent React framework (Next.js). The roadmap is divided into three major milestones focused on improving Open Source Software (OSS) contributions, user experience, and developer experience (DevEx).

    Key Strategic Goals

    1. User Experience (UX)

    • Transition to consistent typography, buttons, and links.
    • Achieve A11y WAG 2.1 compliance.
    • Implement a tailored and configurable homepage.
    • Declutter the Table Detail page metadata by using expandable blocks.
    • Improve error handling with actionable UI messages.

    2. Codebase Quality

    • Upgrade React from v16 to v18.
    • Move from Enzyme to React Testing Library for unit tests.
    • Target 80%+ overall test coverage and include end-to-end (E2E) testing.
    • Centralize URL logic and ensure API type verification.
    • Replace hardcoded JSX strings with constants.
    • Transition to optimal, maintainable Redux logic.

    3. Developer Experience (DevEx) and Collaboration

    • Simplify the developer environment setup.
    • Provide thorough documentation, including configuration examples, code style guides, and naming conventions.
    • Implement PR previews with extensive test data.
    • Update the OSS Docker image to include showcases of configurable features and updated package versions.
  6. Understand Amundsen Feature Models

    main

    Amundsen uses specific models to represent feature metadata. The core model is FeatureMetadata, which serves as the baseline and must be ingested before any supplemental models that build relations to it.

    Key feature-related models include:

    • FeatureMetadata: Encapsulates basic feature details.
    • Feature_Generation_Code: Stores the text of the generation code (SQL or otherwise) used to create a feature.
    • Feature_Watermark: Stores the high and low data range of a feature. This is a general model that does not require specific storage implementation details (unlike the table-specific Watermark model).
    • Supplemental models: Tag, Badge, Owner, and Programmatic_Description also work in conjunction with features.
  7. Understand the Amundsen Frontend Strategy

    main

    The Amundsen Frontend Strategy is a technical roadmap designed to address stagnation in the UI codebase. It outlines the transition from the current state (characterized by inconsistent UX, sub-par codebase quality, and developer friction) to a target state focused on consistency, high-quality testing, and improved developer experience.

    Key areas of focus include:

    • User Experience: Moving towards A11y WAG 2.1 compliance, consistent typography, and a tailored homepage.
    • Codebase Quality: Upgrading to React v18, implementing React Testing Library, achieving 80%+ test coverage, and cleaning up Redux logic and API endpoints.
    • Developer Experience: Improving documentation, updating Docker images for OSS contributors, and moving toward a Next.js framework that is independent of the Flask API.
  8. Understand the Amundsen Architecture

    main

    Amundsen's architecture consists of four primary components:

    1. Frontend: A Flask-based web application with a React/Redux UI for user interaction.
    2. Search: A proxy service providing a RESTful API for search requests. It leverages Elasticsearch (or Apache Atlas) and currently supports indexing and searching of table resources.
    3. Metadata: A service that uses a Neo4j proxy to interact with a Neo4j graph database, serving metadata represented as a graph model.
    4. Databuilder: A data ingestion library used to build and populate the metadata.
  9. Understand Amundsen Data Models

    main

    Amundsen uses Python classes located in databuilder/models/ to represent data structures stored in Neo4j or Elasticsearch.

    Models that extend Neo4jSerializable include built-in methods to create both nodes and relationships. This abstraction allows developers to build pipelines that load Python objects into Neo4j or Elasticsearch without needing to manage the underlying Neo4j schema manually.

  10. Understand Dashboard Models and Normalization

    main

    Dashboard models in Amundsen are designed using a normalized approach. This means models are separated (e.g., DashboardMetadata, DashboardOwner, DashboardTable) to decouple the model from the extraction logic.

    While this can be less efficient than a denormalized approach (where one extraction job pulls all data), it provides maximum flexibility for various metadata sources.

  11. Enable Amundsen search from the browser address bar

    main

    To allow users to search Amundsen directly from their web browser's address bar, Amundsen implements the OpenSearch standard using an opensearch.xml file. This file provides a template for search URLs that browsers can use to add Amundsen as a custom search engine.

    To enable this feature, ensure that the FRONTEND_BASE configuration variable is set. When FRONTEND_BASE is configured, the index.html file includes a link to the opensearch.xml file. Browsers will then automatically detect this and offer to add Amundsen as a search engine (e.g., in Chrome, these can be managed at chrome://settings/searchEngines).