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:- Load the golden standards automatically (via SessionStart hook)
- Read the
CONNECTOR_CONTEXT.mdfor context - Study the reference connector (e.g.,
metabase/for dashboards) - Implement each file, following the patterns from the standards
Cursor
Open theCONNECTOR_CONTEXT.md file and the reference connector files in your editor. With Cursor’s Composer:
- Start with
client.py— implement the REST/SDK client - Then
connection.py— wire upget_connection()andtest_connection() - Then
metadata.py— implement the abstract methods - Finally
service_spec.py— usually just needs the correct import
Codex / Copilot / Windsurf
After scaffolding, openCONNECTOR_CONTEXT.md and ask your AI tool:
Step 2: Register the Connector
TheCONNECTOR_CONTEXT.md includes a registration checklist. Ask your AI tool to do it:
2a. Service Schema
Add the connector type toopenmetadata-spec/.../entity/services/{serviceType}Service.json:
2b. UI Service Utils
Updateopenmetadata-ui/.../utils/{ServiceType}ServiceUtils.tsx:
2c. Localization
Add toopenmetadata-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:- 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
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):1
Open the UI
Navigate to http://localhost:8585
2
Create a service
Go to Settings → Services → 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: