-
Notifications
You must be signed in to change notification settings - Fork 6
feature(cSDK): Adding example for connecting to host using bastion server #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🧹 Python Code Quality Check✅ No issues found in Python Files. This comment is auto-updated with every commit. |
There was a problem hiding this comment.
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 example connector that demonstrates how to connect to a private PostgreSQL database through an SSH tunnel using a bastion server. The example implements SSH key-based authentication and incremental data synchronization based on timestamp tracking.
Key changes:
- Implements SSH tunneling with
paramiko
andsshtunnel
libraries for secure database access - Provides incremental sync functionality using
modified_at
timestamp column - Includes comprehensive error handling for SSH and database connection issues
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
examples/common_patterns_for_connectors/bastion_server/requirements.txt | Specifies required dependencies for SSH tunneling and PostgreSQL connectivity |
examples/common_patterns_for_connectors/bastion_server/connector.py | Main connector implementation with SSH tunnel setup and database operations |
examples/common_patterns_for_connectors/bastion_server/configuration.json | Template configuration file with placeholder values for connection parameters |
examples/common_patterns_for_connectors/bastion_server/README.md | Comprehensive documentation covering setup, configuration, and usage |
README.md | Updates main README to include reference to the new bastion server example |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
examples/common_patterns_for_connectors/bastion_server/README.md
Outdated
Show resolved
Hide resolved
examples/common_patterns_for_connectors/bastion_server/connector.py
Outdated
Show resolved
Hide resolved
examples/common_patterns_for_connectors/bastion_server/connector.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
examples/common_patterns_for_connectors/bastion_server/README.md
Outdated
Show resolved
Hide resolved
examples/common_patterns_for_connectors/bastion_server/README.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-sahilkhirwal Please see suggestions.
Co-authored-by: Dejan Tucakov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added minor comments, rest looks good.
examples/common_patterns_for_connectors/bastion_server/README.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README LGTM
examples/common_patterns_for_connectors/ssh_tunnels/using_bastion_server/README.md
Outdated
Show resolved
Hide resolved
examples/common_patterns_for_connectors/ssh_tunnels/using_bastion_server/README.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Jira ticket
Closes https://fivetran.atlassian.net/browse/RD-978153
Description of Change
Adds example for connecting to source using the bastion server ( jump server )
The source is a postgreSQL database in this case
Testing
paramiko
andsshtunnel
using private key based authenticationChecklist
Some tips and links to help validate your PR:
fivetran debug
command.