Skip to content
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

Add DLQ support to JdbcToBigQuery using BQ Storage Write API #2016

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Polber
Copy link
Contributor

@Polber Polber commented Nov 15, 2024

This PR adds proper error handling to the JdbcToBigQueryFlex template when using Storage Write API.

Before this change, the WriteToBigQuery step would succeed even when there were write failures. These errors were never captured or handled, thus resulting in dropped rows. This PR will now fail the pipeline on write errors by default when using Storage Write API. If a deadletter table is specified, then errors will instead be written the the DLQ table (created if needed).

@Polber Polber added the addition New feature or request label Nov 15, 2024
@Polber Polber self-assigned this Nov 15, 2024
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 34.69388% with 32 lines in your changes missing coverage. Please review.

Project coverage is 45.56%. Comparing base (046865d) to head (45ae79e).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...le/cloud/teleport/v2/templates/JdbcToBigQuery.java 27.02% 22 Missing and 5 partials ⚠️
.../cloud/teleport/v2/transforms/ErrorConverters.java 58.33% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2016      +/-   ##
============================================
+ Coverage     45.51%   45.56%   +0.05%     
- Complexity     3704     4047     +343     
============================================
  Files           845      847       +2     
  Lines         50084    50213     +129     
  Branches       5268     5279      +11     
============================================
+ Hits          22794    22879      +85     
- Misses        25618    25654      +36     
- Partials       1672     1680       +8     
Components Coverage Δ
spanner-templates 67.01% <78.31%> (+0.10%) ⬆️
spanner-import-export 64.18% <ø> (-0.03%) ⬇️
spanner-live-forward-migration 75.91% <ø> (+0.02%) ⬆️
spanner-live-reverse-replication 76.87% <78.31%> (+0.22%) ⬆️
spanner-bulk-migration 86.56% <ø> (+0.01%) ⬆️
Files with missing lines Coverage Δ
.../cloud/teleport/v2/transforms/ErrorConverters.java 30.48% <58.33%> (+1.43%) ⬆️
...le/cloud/teleport/v2/templates/JdbcToBigQuery.java 43.80% <27.02%> (-9.82%) ⬇️

... and 4 files with indirect coverage changes

@Polber Polber added improvement and removed addition New feature or request labels Nov 15, 2024
damccorm
damccorm previously approved these changes Nov 18, 2024
Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

Thanks

@Polber
Copy link
Contributor Author

Polber commented Nov 18, 2024

Re-triggered failed workflows (Java PR in particular did not run full IT suite)

damccorm
damccorm previously approved these changes Nov 20, 2024
Abacn
Abacn previously approved these changes Nov 22, 2024
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.

3 participants