How to Build a Connector SDK Connector with Visual Studio Code and GitHub Copilot
The video tutorial demonstrates how to build a Fivetran Connector SDK custom connector using Copilot, an AI pair programmer. The demo showcases the end-to-end process of creating, testing, and deploying a connector for the FDA Tobacco API.
Prepare the AI assistant using a special agents.md file. This file defines the goals, formatting rules, and behavior for Copilot. It helps ensure the AI follows consistent practices during code generation.
To help the AI understand the target data source (for the purposes of this example, FDA Tobacco APIs), compile authentication info, endpoint details, and sample payloads into a notes.txt file.
I need a Fivetran Connector SDK solution for https://api.fda.gov/tobacco/problem.json.
I have some notes and example queries in #file:notes.txt and the fields documented in #file:fields.yaml.
Have it dynamically create tables based on the endpoints available. Flatten the dictionaries and upsert the key:value pairs as the columns for the tables.
Only define the Primary Key for the schema objects, let Fivetran infer the rest.
Process the first 10 responses from each endpoint and then exit gracefully, we do not have an API key and do not want to exceed the limits.
Create a Fivetran Connector SDK solution that follows Fivetran best practice outlined in #file:fivetran_connector_sdk.instructions.md.
I have the files prepared in #file:FDA_tobacco.
The AI assistant generates and populates all required files live in VS Code:
connector.py
configuration.json
requirements.txt
README.md
This marks the completion of the prompt execution phase, after which the developer moves into the testing and validation stage using fivetran debug.
With the files generated, test the connector using the fivetran debug command. The tool validates the configuration and performs a limited sync, returning an upsert summary to verify correctness.
In the video tutorial, when an error occurs due to an incorrect working directory, the AI agent suggests a correction and re-runs the test. This highlights how well-structured prompts and AI agents can resolve issues dynamically.
Use DuckDB to inspect the synced data and verify that the expected schema and values were loaded. See our Working with DuckDB documentation to learn more.
Once validated, deploy the connector using the fivetran deploy command. The CLI should return the connection ID and confirm the success of the deployment.
In this tutorial, you built a custom Fivetran Connector SDK connector using a contextually-driven prompt seeded with three inputs:
A system instruction file (agents.md) available in the Fivetran GitHub repo
A custom notes.txt file containing connector-specific context
Online API documentation providing schema and field details
With this context in place, you prompted the AI agent to generate the custom connector, ran test commands directly in the chat, and allowed the agent to self-resolve errors. The result was a working connector that successfully queried data and synced it to Fivetran.
This workflow is not limited to VS Code and GitHub Copilot — the same approach can be applied using any IDE or AI model.