example(connector_sdk) : Error and warnings - #617
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.
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.mdto 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
zipcodeearlier in the loop, this laterif 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=(
fivetran-anushkaparashar
left a comment
There was a problem hiding this comment.
Added a few comments
Correct formatting for error handling example link in README.
fivetran-dejantucakov
left a comment
There was a problem hiding this comment.
@fivetran-JenasVimal Approved with changes
Co-authored-by: Dejan Tucakov <dejan.tucakov@fivetran.com>
Co-authored-by: Dejan Tucakov <dejan.tucakov@fivetran.com>
708a8c0
fivetran-anushkaparashar
left a comment
There was a problem hiding this comment.
Changes look good!
Please fix the failing spec!
fivetran-sahilkhirwal
left a comment
There was a problem hiding this comment.
minor comments
Rest looks good
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 debugfivetran deployChecklist
Some tips and links to help validate your PR:
fivetran debugcommand.