Skip to content

feature(csdk): proxy agent support example - #615

Merged
fivetran-rishabhghosh merged 22 commits into
mainfrom
proxy-example-csdk
Aug 11, 2026
Merged

feature(csdk): proxy agent support example #615
fivetran-rishabhghosh merged 22 commits into
mainfrom
proxy-example-csdk

Conversation

@fivetran-sinchanahegde

@fivetran-sinchanahegde fivetran-sinchanahegde commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Jira ticket

Closes https://fivetran.atlassian.net/browse/RD-1202613

Description of Change

Example to use proxy agent in csdk

Testing

  • Simple Postgres Connection Connector Example
Screenshot 2026-08-04 at 10 36 08 AM Screenshot 2026-08-04 at 10 40 56 AM Screenshot 2026-08-04 at 10 54 24 AM
  • Multiple Hosts Connector Example
Screenshot 2026-08-04 at 10 55 44 AM Screenshot 2026-08-04 at 10 56 01 AM Screenshot 2026-08-04 at 11 24 37 AM
  • custom host key
Screenshot 2026-08-04 at 11 25 08 AM Screenshot 2026-08-04 at 11 24 23 AM

Checklist

Some tips and links to help validate your PR:

  • Tested the connector with fivetran debug command.
  • Added/Updated example-specific README.md file, see the README template for the required structure and guidelines.
  • Followed Python Coding Standards, refer here

Copilot AI review requested due to automatic review settings August 3, 2026 07:45
@fivetran-sinchanahegde
fivetran-sinchanahegde requested review from a team as code owners August 3, 2026 07:45
@cla-assistant

cla-assistant Bot commented Aug 3, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Sinchana Hegde seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

🧹 Python Code Quality Check

✅ No issues found in Python Files.

🔍 See how this check works

This comment is auto-updated with every commit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new “Proxy Agent” set of Connector SDK examples showing how to connect to PostgreSQL sources when traffic is routed through a Fivetran Proxy Agent, including single-host, multi-host failover, and a custom proxy host configuration key.

Changes:

  • Added three new proxy-agent PostgreSQL connector examples (single host, multiple hosts failover, custom host key).
  • Added per-example READMEs, configuration.json templates, and psycopg2-binary dependency pins.
  • Updated the top-level examples/README.md to include the new Proxy Agent examples section.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
examples/README.md Adds links to the new Proxy Agent examples.
examples/common_patterns_for_connectors/proxy_agent/simple_postgres_connection/requirements.txt Pins psycopg2-binary for the single-host example.
examples/common_patterns_for_connectors/proxy_agent/simple_postgres_connection/README.md Documents setup, deploy, and behavior for the single-host proxy-agent example.
examples/common_patterns_for_connectors/proxy_agent/simple_postgres_connection/connector.py Implements the single-host PostgreSQL connector example behind a proxy agent.
examples/common_patterns_for_connectors/proxy_agent/simple_postgres_connection/configuration.json Provides a placeholder configuration template for the single-host example.
examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/requirements.txt Pins psycopg2-binary for the multi-host failover example.
examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/README.md Documents setup and failover behavior for the multi-host example.
examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/connector.py Implements host iteration + connection failover for proxy-agent PostgreSQL connectivity.
examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/configuration.json Provides a placeholder configuration template using a hosts array.
examples/common_patterns_for_connectors/proxy_agent/custom_proxy_host_key/requirements.txt Pins psycopg2-binary for the custom-key example.
examples/common_patterns_for_connectors/proxy_agent/custom_proxy_host_key/README.md Documents using --proxy-host-config-key and a custom proxy host configuration key.
examples/common_patterns_for_connectors/proxy_agent/custom_proxy_host_key/connector.py Implements the custom-key variant of proxy-agent PostgreSQL connectivity.
examples/common_patterns_for_connectors/proxy_agent/custom_proxy_host_key/configuration.json Provides a placeholder configuration template for the custom-key example.
Suppressed comments (4)

examples/common_patterns_for_connectors/proxy_agent/custom_proxy_host_key/connector.py:175

  • The update() docstring should match the template connector (URL + exact wording/format) for consistency with the rest of the repo.
    """
    Define the update function, which is a required function, and is called by Fivetran during each sync.
    See the technical reference documentation for more details on the update function
    https://fivetran.com/docs/connectors/connector-sdk/technical-reference#update
    Args:

examples/common_patterns_for_connectors/proxy_agent/custom_proxy_host_key/connector.py:201

  • The connector creation + local __main__ debug block should match the repo’s template connector so users get consistent guidance (especially around fivetran debug).
# This creates the connector object that will use the update and schema functions defined in this connector.py file.
connector = Connector(update=update, schema=schema)

# Check if the script is being run as the main module. This is Python's standard entry method allowing your script to
# be run directly from the command line or IDE 'run' button. This is useful for debugging while you write your code.
# Note this method is not called by Fivetran when executing your connector in production. Please test using the
# Fivetran debug command prior to finalizing and deploying your connector.
if __name__ == "__main__":
    try:
        with open("configuration.json", "r") as f:
            configuration = json.load(f)
    except FileNotFoundError:
        configuration = {}
    connector.debug(configuration=configuration)

examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/connector.py:216

  • The update() docstring should match the template connector (URL + exact wording/format) so the example stays aligned with the documented API reference.
    """
    Define the update function, which is a required function, and is called by Fivetran during each sync.
    See the technical reference documentation for more details on the update function
    https://fivetran.com/docs/connectors/connector-sdk/technical-reference#update
    Args:

examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/connector.py:242

  • The connector creation + local __main__ debug block should match the repo’s template connector so users get consistent guidance (especially around fivetran debug).
# This creates the connector object that will use the update and schema functions defined in this connector.py file.
connector = Connector(update=update, schema=schema)

# Check if the script is being run as the main module. This is Python's standard entry method allowing your script to
# be run directly from the command line or IDE 'run' button. This is useful for debugging while you write your code.
# Note this method is not called by Fivetran when executing your connector in production. Please test using the
# Fivetran debug command prior to finalizing and deploying your connector.
if __name__ == "__main__":
    try:
        with open("configuration.json", "r") as f:
            configuration = json.load(f)
    except FileNotFoundError:
        configuration = {}
    connector.debug(configuration=configuration)

Comment thread examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/README.md Outdated
Comment thread examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/README.md Outdated
Comment thread examples/common_patterns/proxy_agent/multiple_hosts/connector.py
Comment thread examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/connector.py Outdated

@fivetran-sahilkhirwal fivetran-sahilkhirwal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@fivetran-JenasVimal fivetran-JenasVimal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT comments , will approve one you resolve them

Comment thread examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/README.md Outdated
Comment thread examples/common_patterns_for_connectors/proxy_agent/multiple_hosts/README.md Outdated

@fivetran-dejantucakov fivetran-dejantucakov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-sinchanahegde Left a couple of more suggestions/comments

@fivetran-dejantucakov fivetran-dejantucakov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-JenasVimal fivetran-JenasVimal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread examples/common_patterns/proxy_agent/custom_proxy_host_key/README.md Outdated

@fivetran-dejantucakov fivetran-dejantucakov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-rishabhghosh
fivetran-rishabhghosh merged commit ac24cc6 into main Aug 11, 2026
3 of 4 checks passed
@fivetran-rishabhghosh
fivetran-rishabhghosh deleted the proxy-example-csdk branch August 11, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted/yes risk/low size/XXL PR size: extra extra large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants