Using Claude AI to Build a Custom Connector With Fivetran’s Connector SDK
The video tutorial demonstrates how to build a Fivetran Connector SDK custom connector using Claude, an AI assistant developed by Anthropic.
The demo showcases the end-to-end process of creating, testing, debugging, and deploying a custom Fivetran connector using structured prompts and project context files for Claude.
The tutorial is based on our FDA Tobacco Problem API Connector example connector..
How to Build a Connector SDK Connector with Claude
The sections below provide high-level step-by-step instructions on how to build a custom Fivetran connector using Connector SDK and Claude AI.
For detailed instructions, see our video tutorial and follow the links for additional educational resources.
Prerequisites
Before starting, ensure the following:
- Connector SDK is installed (see How to Install Fivetran Connector SDK for detailed instructions)
- Connector SDK prerequisites
- (Optional but recommended) API key is stored as an environment variable
- DuckDB is installed for local data inspection
Prepare project directory and context files
Watch this tutorial's segment on YouTube (00:00 - 01:57)
Expand for details
Create a project directory named FDA_Tobacco_Claude
. Inside this folder, add three key files to establish context for Claude:
claude_md
: A renamed copy of theagents.md
file from the Fivetran Connector SDK public GitHub repo. It includes system goals, response formatting rules, and SDK-specific instructions.notes.txt
: A manually prepared file containing authentication method, endpoint overview, sample API queries, and example JSON responses. This information is pulled directly from the FDA Tobacco API documentation.fields.yaml
: A file downloaded from the API’s documentation that describes the available fields in the dataset.
These files act as local prompt context Claude will reference when generating connector code.
See our How to Create a Project Folder documentation if you need in-depth instructions.
Initiate Claude with structured prompt
Watch this tutorial's segment on YouTube (01:57 - 03:51)
Expand for details
In your terminal or command prompt, change into the FDA_Tobacco_Claude
directory. Start a new Claude chat session and create a contextually-driven prompt that is divided into three sections:
Data source instructions
- Explain that the connector will extract data from the FDA Tobacco Problem Reports API
- Mention that the connector should support incremental sync and use checkpoints
Functional and development constraints
- Limit responses to the first 10 results per endpoint (to avoid unnecessary API load during testing)
- Add a requirement to exit gracefully
- Ask Claude to include clear comments and strategic logging
- Instruct Claude to define only the primary key and let Fivetran infer the rest
Context references and execution location
- Point to
claude_md
,notes.txt
, andfields.yaml
in the current folder - State that the solution should be written to this project directory and follow Connector SDK best practices
Generate connector files using Claude
Watch this tutorial's segment on YouTube (03:51 - 04:44)
Expand for details
Ask Claude to generate the following files:
connector.py
: The main connector script that handles authentication, schema definition, and sync logic.configuration.json
: Dependency list for Python packages.requirements.txt
: Configuration template with required parameters.
Claude proceeds to generate each file in sequence:
- It first creates
connector.py
and outlines its structure. - Then, it generates a basic
requirements.txt
containing packages such asfivetran_sdk
. - Finally, it writes out
configuration.json
using values referenced in the notes.
Once completed, confirm that all files now exist in your project directory.
Run fivetran debug
and resolve issues
Watch this tutorial's segment on YouTube (04:44 - 05:21)
This tutorial uses an API key stored as an environment variable for authentication. Ensure your environment is configured before running the debug
or deploy
commands.
Expand for details
Prompt Claude to test its own output by running:
fivetran debug connector.py --configuration configuration.json
The debug should succeed with the following summary:
- 10 upserts performed
- 1 checkpoint created
- 1 schema change detected
In the video tutorial, Claude executes the command and identifies an issue during the first run. If that occurs, ask Claude to propose a fix and modify the code directly within the chat. Then, rerun the command.
Verify output data from warehouse.db
Watch this tutorial's segment on YouTube (05:21 - 06:05)
This step uses DuckDB to inspect the local warehouse output. If you haven’t installed DuckDB, see Connecting to DuckDB.
Expand for details
Ask Claude to inspect the output database (warehouse.db
) that was created by the Connector SDK during the debug run. Claude reads and presents a sample of the replicated records.
This confirms that data was fetched, processed, and written according to the connector logic.
Deploy the connector using Claude
Watch this tutorial's segment on YouTube (06:05 - 07:44)
Expand for details
Ask Claude to deploy the connector to Fivetran using:
fivetran deploy
Claude prompts for additional details required by the CLI:
- Destination:
csg_auto_test
- Connection name:
FDA tobacco video
- Configuration file:
configuration.json
Once these values are provided, Claude submits the deployment command. The CLI confirms that the deployment was successful and provides a direct link to the new connector in the Fivetran UI.
Start initial sync in Fivetran dashboard
Watch this tutorial's segment on YouTube (07:44 - 08:20)
Expand for details
Use the deployment link to open the new connector in your Fivetran dashboard. From there, start the initial sync.
Claude confirms that:
- A schema and associated tables are created in Snowflake
- Replicated data has successfully loaded from the FDA API
Recap
Watch the recap on YouTube (08:20 - 09:30)
You began with a project folder containing just notes.txt
and fields.yaml
, then added a Claude-readable claude_md
derived from agents.md
. With those context files in place, you:
- Wrote a multi-part structured prompt
- Instructed Claude to generate all required Connector SDK files
- Tested the connector using
fivetran debug
- Verified the output with Claude
- Deployed and synced the connector
The entire process was completed without writing any code manually — all through Claude.