Skip to content

🎉 Destination S3 & GCS: support additional properties - #7288

Merged
Liren Tu (tuliren) merged 19 commits into
masterfrom
liren/patch-avro-schema-converter
Nov 3, 2021
Merged

Liren Tu (tuliren) merged 19 commits into
masterfrom
liren/patch-avro-schema-converter

Conversation

@tuliren

@tuliren Liren Tu (tuliren) commented Oct 22, 2021 •

Copy link
Copy Markdown
Contributor

What

How

Recommended reading order

  • Schema conversion: JsonToAvroSchemaConverter.java
  • Schema and object conversion test cases: json_conversion_test_cases.json
  • The rest

Pre-merge Checklist (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

@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 22, 2021 20:42 Inactive
@github-actions github-actions Bot added the area/connectors Connector related issues label Oct 22, 2021
@tuliren Liren Tu (tuliren) changed the title Support additional properties in json schema 🎉 Destination S3 & GCS: support additional properties Oct 22, 2021
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 22, 2021 21:54 Inactive
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 22, 2021 23:12 Inactive
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 23, 2021 08:26 Inactive
@tuliren
Liren Tu (tuliren) force-pushed the liren/patch-avro-schema-converter branch from e2f0772 to 083e240 Compare October 23, 2021 10:23
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 23, 2021 10:25 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets October 23, 2021 10:27 Inactive
@tuliren

Liren Tu (tuliren) commented Oct 23, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1375305615
✅ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1375305615
No Python unittests run

@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 23, 2021 10:41 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets October 23, 2021 10:42 Inactive
@github-actions github-actions Bot added the area/documentation Improvements or additions to documentation label Oct 23, 2021
@tuliren

Liren Tu (tuliren) commented Oct 23, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-gcs

🕑 connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1375313805
✅ connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1375313805
No Python unittests run

@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 23, 2021 10:45 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets October 23, 2021 10:47 Inactive
@tuliren
Liren Tu (tuliren) marked this pull request as ready for review October 23, 2021 11:11
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 23, 2021 11:12 Inactive
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 23, 2021 11:15 Inactive
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 23, 2021 15:21 Inactive
@tuliren

Liren Tu (tuliren) commented Oct 23, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1376175359
✅ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1376175359
No Python unittests run

@tuliren

Liren Tu (tuliren) commented Oct 23, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-gcs

🕑 connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1376175739
✅ connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1376175739
No Python unittests run

@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets October 23, 2021 19:34 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets October 23, 2021 19:35 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets October 23, 2021 19:35 Inactive
"default":null
}
]
},

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.

if I'm reading this file correctly, the json schema doesn't actually need to have additionalProperties=true for this column to be added/handled correctly, is that right? That seems like a good idea because it makes it resilient to undocumented/unannounced schema changes

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.

Right. Most schemas do not specify additionalProperties=true and many of them include additional fields anyway. Eventually, I think we should handle all invalid cases. The S3 destination does not judge. It only hoards!

@tuliren
Liren Tu (tuliren) force-pushed the liren/patch-avro-schema-converter branch from 241bb5b to 74457e8 Compare November 3, 2021 08:14
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets November 3, 2021 08:16 Inactive
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets November 3, 2021 08:50 Inactive
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets November 3, 2021 09:06 Inactive
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets November 3, 2021 09:08 Inactive
@tuliren

Liren Tu (tuliren) commented Nov 3, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1416033463
✅ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1416033463
No Python unittests run

@tuliren

Liren Tu (tuliren) commented Nov 3, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-gcs

🕑 connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1416034024
✅ connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1416034024
No Python unittests run

@tuliren

Copy link
Copy Markdown
Contributor Author

Confirmed in a local deployment that the new Json Avro converter can properly handle S3 source with additional properties.

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 09:23 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 09:23 Inactive
@tuliren

Liren Tu (tuliren) commented Nov 3, 2021 •

Copy link
Copy Markdown
Contributor Author
  • Bump version once the connectors are published.

@tuliren

Liren Tu (tuliren) commented Nov 3, 2021 •

Copy link
Copy Markdown
Contributor Author

/publish connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1417499698
✅ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1417499698

@tuliren

Liren Tu (tuliren) commented Nov 3, 2021 •

Copy link
Copy Markdown
Contributor Author

/publish connector=connectors/destination-gcs

🕑 connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1417500194
✅ connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1417500194

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 15:46 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 15:46 Inactive
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets November 3, 2021 17:14 Inactive
@tuliren
Liren Tu (tuliren) temporarily deployed to more-secrets November 3, 2021 17:18 Inactive
@tuliren
Liren Tu (tuliren) merged commit c9c41dc into master Nov 3, 2021
@tuliren
Liren Tu (tuliren) deleted the liren/patch-avro-schema-converter branch November 3, 2021 18:37
Konrad Schlatte (schlattk) pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
* Log json schema

* Use patched json avro converter

* Rename schema

* Update unit test cases

* Fix ab ap field schema conversion

* Rename files

* Add unit test cases

* Fix dependency for databricks

* Bump versions

* Update documentations

* Update gcs doc

* Set additional properties field name

* Revert s3 and gcs version

* Specify extra props fields

* Refactor json avro conversion doc

* Update connector doc

* Fix databricks spec typo

* Bump connector versions in seed

This branch was previously deployed

1 inactive deployment
more-secrets — 49ee6063 Deployed Nov 3, 2021 by tuliren
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Destination S3 to Parquet/Avro: Handle empty objects with additionalProperties=true S3 Avro / Parquet output should handle fields of unknown types

4 participants