Skip to main content

Java SDK

The OpenMetadata Java SDK provides a robust client library for Java applications to interact with the OpenMetadata API. It offers comprehensive support for entity management, authentication, and integration with enterprise Java applications.

Installation

Maven

Add the OpenMetadata Java SDK dependency to your pom.xml:

Gradle

Add the dependency to your build.gradle:

Quick Start

Basic Connection

JWT Authentication

Core Functionality

Working with Entities

Database Services

Tables

Entity Operations

CRUD Operations

Search and Filtering

Advanced Features

Authentication Providers

Custom Authentication

OAuth 2.0 Integration

Error Handling

Async Operations

Configuration Options

Client Configuration

Connection Pooling

Common Use Cases

Metadata Discovery

Bulk Operations

Lineage Operations

Spring Boot Integration

Configuration Class

Service Layer

Best Practices

  1. Resource Management: Always close clients when done
  2. Connection Pooling: Use connection pooling for high-throughput applications
  3. Error Handling: Implement proper retry logic and error handling
  4. Authentication: Use secure authentication methods in production
  5. Async Operations: Use async methods for better performance in concurrent scenarios
  6. Pagination: Always handle pagination for large datasets
  7. Caching: Implement caching for frequently accessed entities

Performance Tips

  • Use batch operations when possible
  • Implement connection pooling for high-concurrency applications
  • Cache frequently accessed metadata
  • Use async operations for better throughput
  • Specify only required fields when fetching entities
  • Implement proper retry strategies with exponential backoff