Skip to main content

Build a Connector with AI

This guide walks through the complete workflow for building a connector after scaffolding, using AI tools to implement the code.

Prerequisites

  • Skills installed for your AI tool
  • Connector scaffolded with metadata scaffold-connector
  • Development environment set up: source env/bin/activate

Workflow Overview

1

Scaffold

Generate boilerplate with metadata scaffold-connector.
2

Implement

Use your AI tool to fill in the TODO items in generated files.
3

Register

Add the connector to the service schema, UI, and i18n.
4

Generate

Run code generation: make generate, mvn install, yarn parse-schema.
5

Validate

Run formatting, linting, and tests.

Step 1: Implement with AI

Claude Code

The most streamlined experience. After scaffolding:
Claude Code will:
  1. Load the golden standards automatically (via SessionStart hook)
  2. Read the CONNECTOR_CONTEXT.md for context
  3. Study the reference connector (e.g., metabase/ for dashboards)
  4. Implement each file, following the patterns from the standards
For research-heavy connectors, Claude Code can dispatch the researcher sub-agent:

Cursor

Open the CONNECTOR_CONTEXT.md file and the reference connector files in your editor. With Cursor’s Composer:
Work file-by-file:
  1. Start with client.py — implement the REST/SDK client
  2. Then connection.py — wire up get_connection() and test_connection()
  3. Then metadata.py — implement the abstract methods
  4. Finally service_spec.py — usually just needs the correct import

Codex / Copilot / Windsurf

After scaffolding, open CONNECTOR_CONTEXT.md and ask your AI tool:

Step 2: Register the Connector

The CONNECTOR_CONTEXT.md includes a registration checklist. Ask your AI tool to do it:
Or do it manually. Three files need changes:

2a. Service Schema

Add the connector type to openmetadata-spec/.../entity/services/{serviceType}Service.json:

2b. UI Service Utils

Update openmetadata-ui/.../utils/{ServiceType}ServiceUtils.tsx:

2c. Localization

Add to openmetadata-ui/.../locale/languages/en-us.json:

Step 3: Run Code Generation

Step 4: Format and Validate

Step 5: Review with AI (Optional)

If you’re using Claude Code, run the review skill:
The review skill checks your implementation against the golden standards across 5 categories:
  • Schema and registration — JSON Schema structure, $ref resolution, capability flags
  • Connection and error handling — Auth patterns, no swallowed exceptions, meaningful test steps
  • Source, topology, and performance — Base class, pagination (missing pagination on paginated APIs is a blocker), O(n*m) lookups, N+1 queries, connection reuse
  • Test quality — pytest style, real assertions (not empty stubs), integration tests
  • Code quality and style — Copyright headers, type annotations, import ordering
The review also checks for memory management issues — unbounded file reads, missing gc.collect() after large object processing, and unbounded caches that can cause OOM errors in production.

Step 6: Test Locally in Docker

Build everything and bring up a full local OpenMetadata stack so you can test your connector in the UI. Full build (first time, or if Java/UI changes were made):
Fast rebuild (ingestion-only changes — skips Maven, ~2-3 minutes):
Once services are up (~3-5 minutes):
1

Open the UI

2

Create a service

Go to SettingsServices → select your service type (Database, Dashboard, etc.) → Add New Service
3

Select your connector

Your connector should appear in the dropdown. If it doesn’t, check that you registered it in the service schema and rebuilt without -s true.
4

Test the connection

Fill in the connection details and click Test Connection. Each step should pass.
5

Run ingestion

If the test passes, run metadata ingestion to verify entities are created correctly.
Tear down when done:
If you only changed ingestion Python code (no Java or schema changes), use -s true to skip the Maven build. This cuts rebuild time from ~5 minutes to ~2 minutes.

Validation Checklist

Before submitting a PR, verify:

Example: Building a Dashboard Connector End-to-End

Here’s a complete example building a Grafana dashboard connector with Claude Code: