Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Datahub project Datahub Datahub Client Maven Dependency

From Leeroopedia


Property Value
Implementation Name Datahub_Client_Maven_Dependency
Type External Tool Doc
Category Java_SDK_Metadata_Emission
Workflow Java_SDK_Metadata_Emission
Repository https://github.com/datahub-project/datahub
Last Updated 2026-02-09 17:00 GMT

Overview

Description

Datahub_Client_Maven_Dependency documents how to declare the DataHub Java SDK dependency in Maven and Gradle build files. The primary artifact is io.acryl:datahub-client, which serves as the entry point for all metadata emission functionality. Declaring this single dependency causes the build system to transitively resolve the companion artifacts datahub-event (event wrappers including MetadataChangeProposalWrapper) and metadata-models (generated Avro/PDL model classes such as DatasetProperties, SchemaMetadata, etc.).

Usage

Add the dependency declaration to your project build file. The build system will download the SDK JARs and all transitive dependencies from Maven Central, making the emitter classes, event wrappers, and metadata model classes available on the classpath.

Code Reference

Source Location

Property Value
File metadata-integration/java/as-a-library.md
Lines L1-132
Repository https://github.com/datahub-project/datahub

Signature

Maven:

<dependency>
    <groupId>io.acryl</groupId>
    <artifactId>datahub-client</artifactId>
    <version>__version__</version>
</dependency>

Gradle:

implementation 'io.acryl:datahub-client:__version__'

Import

Once the dependency is resolved, the following imports become available:

import datahub.client.rest.RestEmitter;
import datahub.client.kafka.KafkaEmitter;
import datahub.client.file.FileEmitter;
import datahub.client.s3.S3Emitter;
import datahub.event.MetadataChangeProposalWrapper;
import datahub.client.Emitter;
import datahub.client.Callback;
import datahub.client.MetadataWriteResponse;

Key Parameters

Parameter Type Description
groupId String Always io.acryl
artifactId String Always datahub-client
version String SDK version (check Maven Central for latest)

I/O Contract

Direction Description
Input Build file configuration declaring io.acryl:datahub-client:<version> in pom.xml (Maven) or build.gradle (Gradle)
Output SDK JARs on the classpath: datahub-client, datahub-event, metadata-models, plus transitive dependencies (Apache HttpClient, Jackson, Kafka client, Avro)

Usage Examples

Example 1: Maven POM declaration

<project>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/io.acryl/datahub-client -->
        <dependency>
            <groupId>io.acryl</groupId>
            <artifactId>datahub-client</artifactId>
            <version>0.14.1</version>
        </dependency>
    </dependencies>
</project>

Example 2: Gradle build file declaration

dependencies {
    implementation 'io.acryl:datahub-client:0.14.1'
}

Example 3: Verifying the dependency is resolved

# Maven
mvn dependency:tree | grep datahub

# Gradle
./gradlew dependencies --configuration runtimeClasspath | grep datahub

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment