en un clic
build-connector-package
// Create a pyproject.toml for a source connector and build it as an independent Python package.
// Create a pyproject.toml for a source connector and build it as an independent Python package.
Single step only: audit a completed connector — implementation, testing & simulator validation, artifacts, security smells, cross-doc consistency — and produce a scored markdown review report. Read-mostly; does not modify connector code.
Single step only: implement the connector in Python when the API doc already exists. Do NOT use for full connector creation — use the create-connector agent instead.
Single step only: run the per-source pytest suite, diagnose failures, and fix the connector or simulator until everything passes. Branches on mode={simulate|record}. Do NOT use for full connector creation — use the create-connector agent instead.
Implement test utilities that write test data to the source system and validate end-to-end read cycles.
Set up authentication for a source connector — generate connector spec, collect credentials interactively, and validate auth.
Run the authenticate script to collect credentials from the user via a browser form.
| name | build_connector_package |
| description | Create a pyproject.toml for a source connector and build it as an independent Python package. |
| disable-model-invocation | true |
Create a pyproject.toml for {{source_name}} connector that can be built and distributed as an independent Python package, then build it using the standard Python build process.
src/databricks/labs/community_connector/sources/{{source_name}}/Create a pyproject.toml file in the source directory with the following structure:
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "lakeflow-community-connectors-{{source_name}}"
version = "0.1.0"
description = "{{source_name}} connector for Lakeflow Community Connectors"
requires-python = ">=3.10"
dependencies = [
"pyspark>=3.5.0",
"pydantic>=2.0.0",
"lakeflow-community-connectors>=0.1.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
]
[tool.setuptools]
packages = ["databricks.labs.community_connector.sources.{{source_name}}"]
[tool.setuptools.package-dir]
"databricks.labs.community_connector.sources.{{source_name}}" = "."
[tool.setuptools.package-data]
"*" = ["*.json", "*.md", "*.yaml"]
Dependencies: Each source depends on:
lakeflow-community-connectors>=0.1.0 - provides the interface and libs modulespyspark>=3.5.0 - for Spark DataFrame typespydantic>=2.0.0 - for data validationPackage Naming: Use lakeflow-community-connectors-{{source_name}} format (with hyphens, not underscores)
community-connector upload wraps the build step and pushes the wheel to a UC
Volume in one call. The destination volume and any subdirectories are created
if they don't exist.
community-connector upload {{source_name}} \
--volume-path /Volumes/<catalog>/<schema>/community_connector/packages
To skip the build step and upload a pre-built wheel:
community-connector upload {{source_name}} \
--volume-path /Volumes/<catalog>/<schema>/community_connector/packages \
--wheel dist/{{source_name}}/lakeflow_community_connectors_{{source_name}}-0.1.0-py3-none-any.whl
The CLI sanity-checks the built wheel against
databricks/labs/community_connector/sources/{{source_name}}/ before upload, so
a misconfigured pyproject.toml is caught before it reaches the volume.
Use these only when you need a local wheel artifact without uploading.
python -m build runs setuptools inside a PEP 517 isolated environment, so a
per-connector .venv is not needed — install build once into whichever venv
runs the command.
# One-time, in the venv that owns the CLI / your dev workflow
pip install build
# Build the wheel for {{source_name}}
python -m build --wheel \
src/databricks/labs/community_connector/sources/{{source_name}} \
--outdir dist/{{source_name}}
# Result:
# dist/{{source_name}}/lakeflow_community_connectors_{{source_name}}-0.1.0-py3-none-any.whl
After building, list the wheel contents:
unzip -l dist/{{source_name}}/*.whl
The wheel must contain files under:
databricks/labs/community_connector/sources/{{source_name}}/
src/databricks/labs/community_connector/sources/ for examplesexclude = ["databricks.labs.community_connector.sources*"]