Skip to content

Destination bigquery: better schema evolution error messages - #62106

Merged
Edward Gao (edgao) merged 6 commits into
masterfrom
edgao/bigquery_schema_change_error
Jun 30, 2025
Merged

Edward Gao (edgao) merged 6 commits into
masterfrom
edgao/bigquery_schema_change_error

Conversation

@edgao

@edgao Edward Gao (edgao) commented Jun 26, 2025 •

Copy link
Copy Markdown
Contributor

see e.g. https://cloud.airbyte.com/workspaces/828cc93d-184e-41ca-b9ff-02020c7e703f/connections/fcca9ccb-db27-42b8-b266-627c31a535c6/timeline?=&eventId=c8b33818-a16d-49a3-a808-52153cb3b615&openLogs=true

the error we show in the UI only includes our generic error. We should include the underlying Invalid NUMERIC value: 37,5. Add to the message that the user could run a refresh

also, in cases where schema evolution fails, we leave a temp column in the user's table. This currently causes a weird error (column <temp column> already exists) if they retry the sync. Handle that case so that we continue showing the actual schema evolution error.

also, pin to CDK artifact 0.508 (published from 0da52a3)

@vercel

vercel Bot commented Jun 26, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Jun 27, 2025 9:09pm

@github-actions

Copy link
Copy Markdown
Contributor

👋 Greetings, Contributor!

Here are some helpful tips and reminders for your convenience.

Helpful Resources

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • /format-fix - Fixes most formatting issues.
  • /bump-version - Bumps connector versions.
    • You can specify a custom changelog by passing changelog. Example: /bump-version changelog="My cool update"
    • Leaving the changelog arg blank will auto-populate the changelog from the PR title.
  • /run-cat-tests - Runs legacy CAT tests (Connector Acceptance Tests)
  • /build-connector-images - Builds and publishes a pre-release docker image for the modified connector(s).

📝 Edit this welcome message.

@edgao
Edward Gao (edgao) marked this pull request as ready for review June 26, 2025 22:40
@edgao
Edward Gao (edgao) requested a review from a team as a code owner June 26, 2025 22:40
@github-actions

github-actions Bot commented Jun 26, 2025 •

Copy link
Copy Markdown
Contributor

destination-bigquery Connector Test Results

252 tests   185 ✅  34m 9s ⏱️
 12 suites   67 💤
 12 files      0 ❌

Results for commit d0c45f3.

♻️ This comment has been updated with latest results.

@edgao Edward Gao (edgao) changed the title Destination bigquery: include the actual schema change error in our trace message Destination bigquery: better schema evolution error messages Jun 27, 2025
// If we have no changed columns, we will skip the second alter.
if (initialAlterations.isNotEmpty()) {
databaseHandler.executeWithRetries(
"""ALTER TABLE $tableId ${initialAlterations.joinToString(",")}"""

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.

Should we add a helper for this not duplicate that alter everywhere?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ehhhh. IMO pulling out a helper probably just obfuscates more than anything. Here at least it's relatively simple to figure out what the generated SQL will look like; I think pulling out a shared function will just make that less clear

}
if (addTempColumns.isNotEmpty()) {
databaseHandler.executeWithRetries(
"""ALTER TABLE $tableId ${addTempColumns.joinToString(",")}"""

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.

Should the table name be backticked as well?
It is unclear to me if we should backtick everything moving forward?

@edgao Edward Gao (edgao) Jun 27, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

tableId is already quoted -

val tableId = """`$projectId`.`${tableName.namespace}`.`${tableName.name}`"""

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

but yes, we should be putting backticks around everything

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@github-actions

Copy link
Copy Markdown
Contributor

Note

Detected that there are differences in the Gradle dependencies.

@edgao
Edward Gao (edgao) merged commit ba7b3d6 into master Jun 30, 2025
@edgao
Edward Gao (edgao) deleted the edgao/bigquery_schema_change_error branch June 30, 2025 14:59
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