Skip to content

example(connector_sdk) : Error and warnings - #617

Merged
fivetran-JenasVimal merged 14 commits into
mainfrom
error-and-warnings
Aug 10, 2026
Merged

example(connector_sdk) : Error and warnings#617
fivetran-JenasVimal merged 14 commits into
mainfrom
error-and-warnings

Conversation

@fivetran-JenasVimal

@fivetran-JenasVimal fivetran-JenasVimal commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Jira ticket

RD-1254644

Description of Change

Adding example for the two newly introduced operations , op.error and op.warning
https://github.com/fivetran/engineering/pull/308180#pullrequestreview-4873630590
read this for more info

Testing

fivetran debug

image

fivetran deploy

image image

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 lite review requested due to automatic review settings August 6, 2026 11:37
@fivetran-JenasVimal
fivetran-JenasVimal requested review from a team as code owners August 6, 2026 11:37
@github-actions

github-actions Bot commented Aug 6, 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

Adds a new Connector SDK example under examples/common_patterns/ demonstrating the newly introduced op.warning() and op.error() operations, and links it from the main examples index.

Changes:

  • Added a new “error_and_warning_operations” common-pattern example (connector, README, mock CSV).
  • Documented deterministic behavior for row-level warnings vs terminal primary-key errors.
  • Updated examples/README.md to include the new example.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
examples/README.md Adds a link to the new common-pattern example.
examples/common_patterns/error_and_warning_operations/README.md Documents the new example’s intended warning/error flow and usage.
examples/common_patterns/error_and_warning_operations/mock_weather.csv Provides deterministic input rows to trigger two warnings and a terminal error.
examples/common_patterns/error_and_warning_operations/connector.py Implements the example connector using op.warning() and op.error().
Suppressed comments (1)

examples/common_patterns/error_and_warning_operations/connector.py:138

  • After validating zipcode earlier in the loop, this later if not zipcode: block becomes redundant and will never trigger. Removing it avoids dead code and keeps the example easier to follow.
        # Final terminal error:
        # Empty primary key means record identity is invalid, so sync must stop.
        if not zipcode:
            op.error(
                message=(

Comment thread examples/common_patterns/error_and_warning_operations/connector.py
Comment thread examples/common_patterns/error_and_warning_operations/connector.py
Comment thread examples/common_patterns/error_and_warning_operations/README.md
@fivetran-rishabhghosh
fivetran-rishabhghosh requested review from fivetran-anushkaparashar and fivetran-sahilkhirwal and removed request for a team August 6, 2026 12:13

@fivetran-anushkaparashar fivetran-anushkaparashar 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.

Added a few comments

Comment thread examples/common_patterns/error_and_warning_operations/connector.py
Comment thread examples/common_patterns/error_and_warning_operations/connector.py
Comment thread examples/common_patterns/error_and_warning_operations/connector.py
Comment thread examples/common_patterns/error_and_warning_operations/README.md
Comment thread examples/common_patterns/error_and_warning_operations/README.md Outdated
Comment thread examples/common_patterns/error_and_warning_operations/README.md Outdated
Comment thread examples/common_patterns/error_and_warning_operations/README.md Outdated
Correct formatting for error handling example link in README.

@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 Approved with changes

Comment thread examples/README.md Outdated
Comment thread examples/common_patterns/error_and_warning_operations/README.md Outdated
Comment thread examples/common_patterns/error_and_warning_operations/README.md Outdated
Comment thread examples/common_patterns/error_and_warning_operations/README.md Outdated
Comment thread examples/common_patterns/error_and_warning_operations/connector.py
Comment thread examples/common_patterns/error_and_warning_operations/README.md Outdated
Comment thread examples/common_patterns/error_and_warning_operations/README.md Outdated
fivetran-JenasVimal and others added 2 commits August 10, 2026 00:20
Co-authored-by: Dejan Tucakov <dejan.tucakov@fivetran.com>
Co-authored-by: Dejan Tucakov <dejan.tucakov@fivetran.com>
Comment thread examples/common_patterns/error_and_warning_operations/README.md Outdated

@fivetran-anushkaparashar fivetran-anushkaparashar 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.

Changes look good!
Please fix the failing spec!

@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.

minor comments
Rest looks good

Comment thread examples/common_patterns/error_and_warning_operations/connector.py
Comment thread examples/common_patterns/error_and_warning_operations/connector.py
@fivetran-JenasVimal
fivetran-JenasVimal merged commit 3ecf3ff into main Aug 10, 2026
4 checks passed
@fivetran-JenasVimal
fivetran-JenasVimal deleted the error-and-warnings branch August 10, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants