Setting Up the DataHub Development Environment for Connector Development
DataHub is an open-source context platform for AI agents, bringing together metadata, lineage, data quality, and real-time context so organizations can build trusted data and AI systems.
If you’re planning to build a DataHub connector, the first step is getting a clean DataHub development environment running.
This guide walks through setting up a dedicated development machine, building the DataHub repository, preparing the metadata-ingestion development environment, starting a local DataHub instance, and verifying that everything is ready for connector development.
Prerequisites
Operating System
DataHub connector development requires a Unix-based development environment such as:
- Linux
- macOS
Native Windows development is not officially supported. If your primary workstation runs Windows, you can use a Linux environment through WSL2, a virtual machine (Not Recommended)
or a remote Linux machine such as an AWS EC2 instance. (Recommended)
If you already have a Linux or macOS development machine, you can use it directly, you do not need an EC2 instance unless you want to burn 💰
Since I am natively on windows, For this guide, we will use an AWS EC2 Linux instance as the dedicated development machine. This allows the development environment to remain isolated from the local workstation while still being accessible remotely through SSH.
DataHub Repository
You should have your own fork of the DataHub repository.
For example:
datahub-project/datahub
↓
your-account/datahubIf you already have an existing personal fork that you want to keep for other work, create a separate organization or repository for connector development.
For this setup, I created:
jars-demo/datahub-demoref. link (https://github.com/jars-demo/datahub-demo)
from the upstream:
datahub-project/datahub1. Create the Development Machine
You can use any Linux machine with enough resources to build DataHub and run its development stack.
For this setup, an AWS EC2 instance was used. (t3.xlarge)
Example:
OS: Ubuntu 24.04 LTS
CPU: 4 vCPU
RAM: 16 GB
Storage: 100 GB gp3The exact machine is not important as long as it has enough resources for the DataHub build and local services.
2. Connect to the Machine
From your workstation, connect to the Linux machine using SSH.
For example:
ssh ubuntu@<your-server-ip>You can work from any editor or terminal that supports SSH/remote development:
- Kiro by AWS
- VS Code
- Cursor
- Antigravity
- terminal
- other SSH-compatible development environments
The important part is that the DataHub repository, build tools, Python environment, and DataHub services are running on the Linux machine.
3. Verify the Base Environment
Once connected:
uname -aCheck the available resources:
nproc
free -h
df -hCheck the main tools:
git --version
docker --version
docker compose versionYou should also verify Java and Python:
java -version
python3 --version4. Clone Your DataHub Fork
Move to your home directory:
cd ~Clone your fork:
git clone https://github.com/jars-demo/datahub.gitThen:
cd ~/datahubVerify:
git remote -vYou should have your fork configured as origin.
It is also useful to add the official DataHub repository as upstream:
git remote add upstream https://github.com/datahub-project/datahub.gitVerify:
git remote -vYou should now have:
origin → your fork
upstream → datahub-project/datahub5. Install the Repository Toolchain
DataHub uses repository-managed tooling.
Install mise:
curl https://mise.run | shAdd it to your shell:
echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrcReload the shell:
exec bashVerify:
mise --versionFrom the DataHub repository:
cd ~/datahubTrust the repository configuration:
mise trustInstall the required toolchain:
mise installVerify:
mise ls --localThis allows the DataHub repository to provide the versions of its required development tools instead of relying on arbitrary system-wide versions.
Bonus: Run this in the Shell before moving ahead
echo "=== Python ==="
which python3
python3 --version
echo "=== Java ==="
which java
java -version
echo "=== Node ==="
node --version
echo "=== Yarn ==="
yarn --versionExpected output:
=== Python ===
/home/ubuntu/.local/share/mise/installs/python/3.11/bin/python3
Python 3.11.16
=== Java ===
/home/ubuntu/.local/share/mise/installs/java/25/bin/java
openjdk version "25.0.2" 2026-01-20
OpenJDK Runtime Environment (build 25.0.2+10-69)
OpenJDK 64-Bit Server VM (build 25.0.2+10-69, mixed mode, sharing)
=== Node ===
v22.23.2
=== Yarn ===
1.22.226. Build the DataHub Development Environment
Move into metadata-ingestion:
cd ~/datahub/metadata-ingestionBuild the development environment:
../gradlew :metadata-ingestion:installDevThis prepares the Python ingestion development environment and builds the required DataHub components.
The first build can take some time because the repository needs to download dependencies and build its required components.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
It might not complete the build successfully in the first run itself, it might fail with some dependency issues
Some Key Failures and Commands to solve them are as follows
- Packaging / Dependencies Issue : “kerberos==1.3.1 is being compiled from source, and the current machine doesn’t have the native build/Kerberos development tools installed.
- Key Commands to solve the `kerberos` Issue
sudo apt update
sudo apt install -y build-essential libkrb5-dev2. Python LDAP Dependency Issue: `python-ldap` (v3.4.5) was included because `acryl-datahub[dev]` (v1!0.0.0.dev0) depends on `python-ldap` This error likely indicates that you need to install a library that provides “lber.h” for `python-ldap@3.4.5`
- Key Commands to solve this Python LDAP Dependency Issue
sudo apt install -y libldap2-dev
ls -l /usr/include/lber.h3. sasl/sasl.h → missing
- Key Commands to solve this Missing sasl/sasl.h issue
sudo apt install -y libsasl2-dev
ls -l /usr/include/sasl/sasl.hAfter resolving these dependencies, rerun the build:
./gradlew :metadata-ingestion:installDevIf everything is installed correctly, you should now see:
BUILD SUCCESSFUL7. Activate the Metadata Ingestion Environment
Once installDev completes:
source venv/bin/activateVerify that the environment is active:
which pythonYou should see the Python executable coming from:
~/datahub/metadata-ingestion/venv/Now verify the DataHub CLI:
datahub versionA development installation may report:
DataHub CLI version: unavailable (installed in develop mode)That is expected for the development installation.
Get Jishanahmed AR Shaikh (JARS)’s stories in your inbox
Join Medium for free to get updates from this writer.
The important part is that the datahub command is available.
8. Verify the Ingestion Environment
Run:
python --versionThen:
pip --versionAnd:
datahub --helpAt this point, the metadata-ingestion environment is ready.
9. Run a Baseline Validation
Before developing a connector, verify that the DataHub repository itself is healthy.
Run lint:
../gradlew :metadata-ingestion:lintYou can automatically fix applicable issues with:
../gradlew :metadata-ingestion:lintFixRun the fast test suite:
../gradlew :metadata-ingestion:testQuickAnd verify dependency lock files:
../gradlew :metadata-ingestion:checkLockFileThe purpose of this step is simple:
Make sure the development environment works before introducing connector-specific code.
10. Start the DataHub Development Stack
Move back to the repository root:
cd ~/datahubStarting the local DataHub environment
DataHub provides a development helper workflow through
scripts/dev/datahub-dev.sh setupfollowed byscripts/dev/datahub-dev.sh startFor this connector-development environment, we use the Gradle
quickstartDebugworkflow instead:
./gradlew quickstartDebugThis brings up the local debug/quickstart DataHub stack, including GMS, the frontend, MySQL, Kafka, and OpenSearch.
Note:
Why
quickstartDebughere?
The goal of this environment is to have a reproducible local DataHub instance against which the Python metadata-ingestion connector can be developed and tested.quickstartDebugwas the workflow validated for this setup.
Build Successful ✅
Check the running containers:
docker psYou should see the DataHub development services running.
12. Access DataHub From Your Local Machine
If you are connected to the EC2 instance through SSH, forward the DataHub ports to your local machine.
For example:
Local machine
│
│ localhost:9002
▼
SSH tunnel
│
▼
EC2
│
└── DataHub :9002Similarly, forward GMS:
Local machine
│
│ localhost:8080
▼
SSH tunnel
│
▼
EC2
│
└── DataHub GMS :8080With SSH port forwarding configured, you can open the DataHub UI from your normal local browser:
http://localhost:9002You do not need to expose the DataHub UI publicly on the EC2 instance.
13. Verify GMS From Both Machines
DataHub GMS exposes the REST API used by DataHub clients and ingestion.
From the EC2 machine, test:
curl http://localhost:8080You may receive: (If you don’t receive any such warning, still follow the guide to generate a $TOKEN which is eventually required)
{"timestamp":...,"status":401,"error":"Unauthorized","path":"/"}This is expected when authentication is enabled. The 401 Unauthorized response confirms that the GMS service is reachable, but the request requires authentication.
You can also inspect the response headers using:
curl -i http://localhost:8080You should see:
HTTP/1.1 401 UnauthorizedInitialize DataHub Authentication
The datahub CLI is installed inside the metadata-ingestion virtual environment, so activate the environment before running DataHub CLI commands.
cd ~/datahub/metadata-ingestion
source venv/bin/activateYou should now see the virtual environment in your shell prompt:
(venv) ubuntu@...:~/datahub/metadata-ingestion$Initialize the DataHub CLI configuration and generate a GMS access token:
datahub init \
--host http://localhost:8080 \
--username datahub \
--password datahubThis generates a token and stores the DataHub configuration in:
/home/ubuntu/.datahubenvYou should see output similar to:
✓ Generated token
✓ Configuration written to /home/ubuntu/.datahubenvLoad the generated token into an environment variable:
TOKEN=$(python -c 'import yaml; print(yaml.safe_load(open("/home/ubuntu/.datahubenv"))["gms"]["token"])')Export it as DATAHUB_TOKEN so it can be used by the ingestion recipe later:
export DATAHUB_TOKEN="$TOKEN"To verify that the token is accepted by GMS, make an authenticated request:
curl -i \
-H "Authorization: Bearer $TOKEN" \
http://localhost:8080/aspectsThe /aspects endpoint does not support a GET request, so an authenticated request may return:
HTTP/1.1 400 Bad Requestwith a message similar to:
GET operation not supported for URI: '/aspects'This is expected. The important difference is that the request is no longer rejected with 401 Unauthorized, confirming that the bearer token is being accepted by GMS.
Note: Keep the DataHub token out of source control. The token should be supplied through an environment variable or another appropriate secret-management mechanism when configuring the ingestion pipeline.
Now, run the command given below in the EC2 Shell
echo $TOKENCopy the long string similar to eyJh........gshr
Then, from your local workstation:
curl -i -H "Authorization: Bearer YOUR_TOKEN" http://localhost:8080/aspectsPaste the copied token into YOUR_TOKEN place
Because the SSH tunnel forwards the port, both commands should reach the same DataHub GMS instance.
This is a useful sanity check that the SSH forwarding is working correctly.
14. Verify the DataHub UI
Open your local browser:
http://localhost:9002You can log in with the demo credentials
username: datahub
password: datahubYou should see the DataHub interface.
At this point you have verified both sides:
EC2
│
├── metadata-ingestion venv
│ └── datahub CLI
│
├── DataHub GMS
│ └── localhost:8080
│
└── DataHub UI
└── localhost:9002And from your workstation:
Browser
│
└── localhost:9002
│
└── SSH tunnel
│
└── EC2 DataHub15. Final Development Environment Check
Before starting connector development, verify all of the following.
Repository
cd ~/datahub
git status
git remote -vToolchain
mise --version
mise ls --local
java -version
python3 --versionMetadata ingestion
cd ~/datahub/metadata-ingestion
source venv/bin/activatewhich python
datahub versionDataHub
"curl http://localhost:8080" or "curl -i -H "Authorization: Bearer YOUR_TOKEN" http://localhost:8080/aspects"Containers
docker psLocal browser
Open:
http://localhost:900216. You’re Ready to Build a Connector
The development environment should now look like this:
Your Workstation
┌─────────────────────────┐
│ VS Code / Cursor / Kiro │
│ Terminal / Browser │
└────────────┬────────────┘
│
SSH / Tunnel
│
▼
┌─────────────────────────┐
│ EC2 / Linux │
│ │
│ ~/datahub │
│ │ │
│ └── metadata- │
│ ingestion │
│ │ │
│ venv │
│ │ │
│ datahub CLI │
│ │
│ DataHub Development │
│ Stack │
│ │ │
│ ├── GMS :8080 │
│ └── UI :9002 │
└─────────────────────────┘You now have:
- a DataHub fork ready for development
- the required repository toolchain
- a working
metadata-ingestiondevelopment environment - the DataHub CLI available inside the ingestion environment
- a running DataHub development stack
- GMS accessible on port
8080 - DataHub UI accessible through SSH port forwarding
- a Linux environment ready for connector development
The next step is no longer environment setup.
It is building the connector.
Continued ⬇️
Building a Production Ready Datahub Connector in Under 30 Minutes










