<@U04S8PLJWMT> where would I start building a cust...
# ask-ai
c
@kapa.ai where would I start building a custom connector for a custom sftp source? The sftp-bulk connector is not working and I would like to implement a custom version of this
k
To build a custom SFTP source connector for Airbyte, you have two main options: ### 1. Use the Connector Builder (Recommended for Most Cases) Airbyte strongly recommends starting with the [Connector Builder](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/overview) for most new source connectors, especially if your data source can be accessed via HTTP APIs. However, since SFTP is not an HTTP API, the Connector Builder may not be suitable for your use case. In such cases, you should proceed with a custom code-based connector using the Python CDK or another SDK if needed [source](https://docs.airbyte.com/platform/connector-development/). ### 2. Build a Custom Python Connector For SFTP, you’ll likely need to implement a custom connector using the Python CDK. Here’s how you can get started: #### Environment Setup 1. Clone the Airbyte repository:
Copy code
bash    git clone [email protected]:airbytehq/airbyte.git    cd airbyte
2. Create a new connector directory:
Copy code
bash    mkdir airbyte-integrations/connectors/source-your-sftp    cd airbyte-integrations/connectors/source-your-sftp
3. Initialize the project and add dependencies:
Copy code
bash    poetry init    poetry add airbyte-cdk
4. Add a
metadata.yaml
file
in the root of your connector directory. See the [metadata.yaml format documentation](https://docs.airbyte.com/platform/connector-development/connector-metadata-file). 5. Implement the connector entrypoint scripts (
spec
,
check
,
discover
,
read
). You can use the
run.py
file from other connectors as a reference [source](https://docs.airbyte.com/platform/connector-development/tutorials/custom-python-connector/environment-setup). #### Local Development and Testing - You can develop and test your connector locally using the Airbyte platform. See the [local connector development guide](https://docs.airbyte.com/platform/connector-development/local-connector-development) for more details. - Once your connector is ready, you can build and load the Docker image into your local Airbyte instance for testing [source](https://docs.airbyte.com/platform/contributing-to-airbyte/developing-locally#connector-contributions). #### Additional Notes - If you want to contribute your connector back to Airbyte, follow the [contribution guide](https://docs.airbyte.com/platform/contributing-to-airbyte/submit-new-connector). - If you encounter issues with the existing SFTP Bulk connector (such as authentication problems with older SFTP servers), you may need to implement custom logic in your connector, as discussed in [this GitHub issue](https://github.com/airbytehq/airbyte/issues/46536). Summary: Start by setting up your development environment as described above, then implement your custom SFTP logic using the Python CDK. If you need more advanced features or run into limitations, you can always reach out to the Airbyte community for support. For more details, see the official [Connector Development documentation](https://docs.airbyte.com/platform/connector-development/).