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

🐛 BigQuery source: Fix nested structs #6135

Merged
merged 4 commits into from
Sep 17, 2021

Conversation

irynakruk
Copy link
Contributor

@irynakruk irynakruk commented Sep 16, 2021

What

Sync stops for BigQuery tables with array of nested structs. Error message:
Exception in thread "main" java.lang.UnsupportedOperationException: Retrieving field value by name is not supported when there is no fields schema provided
Array of just struct works fine.

How

Modified Record parse method

Recommended reading order

  1. BigQuerySourceOperations.java

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions
  • Connector version bumped like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Sep 16, 2021
@irynakruk irynakruk requested a review from etsybaev September 16, 2021 12:10
@irynakruk irynakruk linked an issue Sep 16, 2021 that may be closed by this pull request
@irynakruk
Copy link
Contributor Author

irynakruk commented Sep 16, 2021

/test connector=connectors/source-bigquery

🕑 connectors/source-bigquery https://github.com/airbytehq/airbyte/actions/runs/1241814018
✅ connectors/source-bigquery https://github.com/airbytehq/airbyte/actions/runs/1241814018
No Python unittests run

@jrhizor jrhizor temporarily deployed to more-secrets September 16, 2021 13:45 Inactive
@irynakruk irynakruk requested a review from davinchia September 16, 2021 13:55
@irynakruk irynakruk marked this pull request as ready for review September 16, 2021 13:56
Copy link
Contributor

@davinchia davinchia left a comment

Choose a reason for hiding this comment

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

Nice!

Before we publish and merge, can you run the test command to make sure this passes all tests?

In the future, can you also make sure to go through the updating connector checklist before I review? It's make it easier for me to know what has been done/what to focus on. Thanks!

@@ -9,5 +9,5 @@ COPY build/distributions/${APPLICATION}*.tar ${APPLICATION}.tar
RUN tar xf ${APPLICATION}.tar --strip-components=1

# Airbyte's build system uses these labels to know what to name and tag the docker images produced by this Dockerfile.
LABEL io.airbyte.version=0.1.1
LABEL io.airbyte.version=0.1.2
LABEL io.airbyte.name=airbyte/source-bigquery
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I know this wasn't checked in by you, but can you add a new line here. thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, done

@irynakruk
Copy link
Contributor Author

irynakruk commented Sep 17, 2021

Nice!

Before we publish and merge, can you run the test command to make sure this passes all tests?

In the future, can you also make sure to go through the updating connector checklist before I review? It's make it easier for me to know what has been done/what to focus on. Thanks!

Sure, thanks, I'll update connector's checklist, so all will be visible there. I've run test command, also will mark it in the checklist.

@irynakruk
Copy link
Contributor Author

irynakruk commented Sep 17, 2021

/publish connector=connectors/source-bigquery

🕑 connectors/source-bigquery https://github.com/airbytehq/airbyte/actions/runs/1245502796
✅ connectors/source-bigquery https://github.com/airbytehq/airbyte/actions/runs/1245502796

@jrhizor jrhizor temporarily deployed to more-secrets September 17, 2021 12:44 Inactive
@irynakruk irynakruk merged commit 4625d90 into master Sep 17, 2021
@irynakruk irynakruk deleted the irynakruk/5460-bigquery-source-struct-fix branch September 17, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/bigquery connectors/sources-database
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bigquery source connector can't fetch data with nested structs
6 participants