docs/platform/connector-development/local-connector-development.md
This document outlines the tools needed to develop connectors locally, and how to use each tool.
:::tip Using Connector Builder
For most cases, when building new source connectors, we recommend starting with our Low-Code Connector Builder instead of starting from the development tools described here. The Connector Builder provides the most streamlined experience for building new connectors, with little or no code, and directly within the Airbyte web interface. :::
When developing connectors locally, you'll want to ensure the following tools are installed:
uv - Used for installing Python-based CLI apps, such as Poe.docker - Used when building and running connector container images.gradle - Required when working with Java and Kotlin connectors.airbyte-cdk CLI.airbyte-ci (deprecated) - Used for a large number of tasks such as building and publishing.Poe the Poet - This tool allows you to perform common connector tasks from a single entrypoint.
You can install using brew (recommended) or with another package manager:
brew tap nat-n/poethepoet
brew install nat-n/poethepoet/poethepoet
To see a list of available tasks, run poe from any directory in the airbyte repo.
Notes:
poe from the root of the repo, you'll have the options connector, source, and destination. These will each pass the tasks you request along to the specified connector's directory.poe from a connector directory, you'll get a specific list of available tasks, like lint, check-all, etc. The available commands may vary by connector and connector type (java vs python vs manifest-only), so run poe on its own to see what commands are available.poe_tasks directory. And if you find task invocation patterns that are especially helpful, please consider contributing back to those task definition files by creating a new PR.:::tip
You can find the global Poe task definitions for any connector in the poe_tasks directory at the root of the Airbyte repo. These definitions can be a helpful reference if you want to decompose or combine certain tasks to suite your preference or to plug these commands natively into your IDE of choice.
:::
UV is a tool for installing and managing Python applications. It replaces pip, pipx, and a number of other tools. It is also the recommended way to install Python CLI apps like poe.
To install or upgrade uv:
brew install uv
We recommend using Docker Desktop or Orbstack, although other container runtimes might work as well. A full discussion of how to install and use docker is outside the scope of this guide.
See Debugging Docker for common tips and tricks.
Gradle is used in Java and Kotlin development. A full discussion of how to install and use docker is outside the scope of this guide. Similar to running poe, you can run gradle tasks to view a list of available Gradle development tasks.
:::tip
You can also use poe to execute Gradle tasks, often with less typing. From within a connector directory you can run poe gradle tasks for a list of Gradle tasks that apply to the connector and poe gradle TASK_NAME to run a given Gradle task for that connector.
Using this syntax you can avoid the long task prefixes such as typing gradle :integration-tests:connectors:source-mysource:unitTest and instead run poe gradle unitTest within the connector directory.
:::
What we loosely refer to as the "Airbyte CDK" is actually a combination of several CDKs and tools:
For high-throughput connectors, we also use:
airbyte-cdk CLITo install the airbyte-cdk CLI, first install uv using the instructions above. Then you can install or upgrade the airbyte-cdk CLI using:
uv tool install --upgrade 'airbyte-cdk[dev]'
For a list of available commands in the airbyte-cdk CLI, run airbyte-cdk --help.
Airbyte CI (airbyte-ci) is a Dagger-based tool for accomplishing specific tasks. See airbyte-ci --help for a list of commands you can run.
:::warning
The Airbyte CI tool is now deprecated and will be phased out shortly. Most airbyte-ci commands have a simpler equivalent in Poe, which you can discover using poe --help.
:::
If a connector has any prerequisites or dependencies to install, you can install them using poe install. The install task is a generic interface for all connectors - for instance, in Python install runs poetry install --all-extras and for Gradle, it warms the Gradle cache and builds dependencies.
Regardless of connector type, you can always run connector tests using the poe CLI:
# Run a fast-fail set of tests:
poe test-fast
# Run all unit tests:
poe test-unit-tests
# Run all integration tests:
poe test-integration-tests
:::tip
poe-tasks directory at the root of the airbyte repo.poe --help from any connector directory.:::
You can use either Poe or airbyte-cdk to fetch secrets. These are equivalent:
airbyte-cdk secrets fetch
poe fetch-secrets
Using the airbyte-cdk you can also list the available secrets (if any) for the given connector:
airbyte-cdk secrets list
The list command also provides you with a URL which you can use to quickly navigate to the Google Secrets Manager interface. (GCP login will be required.)
Airbyte tools and CI workflows will expect secrets to be stored in Google Secrets Manager (GCP) using the following conventions:
connector: <connector-name>: indicates the name of the connector that the secret pertains to.
connector: source-s3 will be used when testing the S3 source connector.filename: <use-case-name>: The use case name or scenario name that is being declared.
filename values are: config (default), invalid_config, oauth_config, etc.filename: oauth_config value will result in a config file being fetched with the name secrets/oauth_config.json.." character in label text, which is why the label should always be stored without the .json suffix.GCP_PROJECT_ID - This is your alphanumeric project name, which tells Airbyte which project ID to authenticate against when fetching secrets.
GCP_GSM_CREDENTIALS - A variable containing the GCP credentials JSON text for your service account.
To understand which secrets are required for a connector, consult the metadata.yaml and acceptance-test-config.yml files within the connector directory.
To view a list of secrets, or to fetch them locally, you can use the Airbyte CDK CLI:
airbyte-cdk secrets --help - Gives general usage instructions for the secrets CLI functions.airbyte-cdk secrets list - Lists the secrets available for the given connector, along with a GSM deep link to each available secret.
secrets list command is purely a metadata operation; no secrets are downloaded to your machine locally when running this step.airbyte-cdk secrets fetch
.json files within in the connector's secrets, making them available for local connector testing.:::caution
The secrets directory should be automatically excluded from git based upon repo-level .gitignore rules. It is always a good idea to confirm that this is true for your case, and please always use caution whenever handling sensitive credentials.
:::
Maintainers can execute any of the following connector admin commands upon request:
/bump-version - Run the bump version command, which advances the connector version(s) and adds a changelog entry for any modified connector(s)./format-fix - Fixes any formatting issues./run-connector-tests - Run the connector tests for any modified connectors./run-cat-tests - Run the legacy connector acceptance tests (CAT) for any modified connectors. This is helpful if the connector has poor test coverage overall./build-connector-images - Builds and publishes a pre-release docker image for the modified connector(s)./poe - Run a Poe task.When working on PRs from forks, maintainers can apply /format-fix to help expedite formatting fixes, and /run-connector-tests if the fork does not have sufficient secrets bootstrapping or other permissions needed to fully test the connector changes.
Note:
When making breaking changes to a connector, please be sure to follow the breaking change process as outlined in our contribution guidelines.