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

🐛 Destination S3: fixed s3 destination field naming for Parquet and Avro formats #5729

Merged
merged 32 commits into from
Sep 13, 2021

Conversation

andriikorotkov
Copy link
Contributor

@andriikorotkov andriikorotkov commented Aug 30, 2021

What

The bug is described in detail in task #5149. Issue seems to be that some fields in the source start with a numeric character.

How

To avoid an invalid character bug when writing to avro/parquet, the "_" prefix has been added.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? 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
    • docs/SUMMARY.md
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions
  • Connector added to connector index 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

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
    • 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

Connector Generator

  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • The generator test modules (all connectors with -scaffold in their name) have been updated with the latest scaffold by running ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates then checking in your changes
  • Documentation which references the generator is updated as needed.

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Aug 30, 2021
@andriikorotkov andriikorotkov linked an issue Aug 30, 2021 that may be closed by this pull request
@andriikorotkov andriikorotkov changed the title Destination S3: fixed s3 destination field naming for Parquet and Avro formats 🐛 Destination S3: fixed s3 destination field naming for Parquet and Avro formats Aug 31, 2021
Copy link
Contributor

@etsybaev etsybaev left a comment

Choose a reason for hiding this comment

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

LGTM, but please make sure all check\tests passed before moving forward

@andriikorotkov
Copy link
Contributor Author

andriikorotkov commented Sep 2, 2021

/test connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1194714651
❌ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1194714651

@jrhizor jrhizor temporarily deployed to more-secrets September 2, 2021 15:11 Inactive
@andriikorotkov
Copy link
Contributor Author

andriikorotkov commented Sep 2, 2021

/test connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1195132724
❌ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1195132724

@jrhizor jrhizor temporarily deployed to more-secrets September 2, 2021 17:26 Inactive
@andriikorotkov
Copy link
Contributor Author

andriikorotkov commented Sep 3, 2021

/test connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1197134896
❌ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1197134896

@jrhizor jrhizor temporarily deployed to more-secrets September 3, 2021 07:29 Inactive
@andriikorotkov
Copy link
Contributor Author

andriikorotkov commented Sep 3, 2021

/test connector=connectors/destination-s3

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

@jrhizor jrhizor temporarily deployed to more-secrets September 3, 2021 09:04 Inactive
@andriikorotkov andriikorotkov marked this pull request as ready for review September 3, 2021 11:28
Copy link
Contributor

@tuliren tuliren left a comment

Choose a reason for hiding this comment

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

Adding the underscore to every identifier seems unnecessary. Can we do this just for names with invalid characters? I don't want all of our users to have to deal with this extra underscore just because facebook has an API that behaves weirdly. Facebook does not deserve this treatment.

@andriikorotkov
Copy link
Contributor Author

@tuliren I can make the changes you mentioned above. I corrected this in the way the @sherifnada talked about in task #5149. Sherif, could you tell me whether to leave the underscore for all identifiers or do it the way Liren suggested?

@sherifnada
Copy link
Contributor

Liren is correct here IMO we should only do it for streams which start with invalid chars

Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

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

LGTM - could you also add a note in the docs about this behavior, and add a unit test for S3NameTransformer?

We might also need to update/publish the GCS destination since it relies on the same S3 utilities

Copy link
Contributor

@tuliren tuliren left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you.

Maybe add a unit test?

@andriikorotkov
Copy link
Contributor Author

@sherifnada, I fixed all the remarks, updated the documentation and added tests. the problem is that not all jobs are successful. can i merge this pull request without it?

@sherifnada
Copy link
Contributor

@andriikorotkov yup

@andriikorotkov
Copy link
Contributor Author

andriikorotkov commented Sep 13, 2021

/test connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1228615578
❌ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1228615578
🐛 https://gradle.com/s/y2lvt3vj4svhu

@jrhizor jrhizor temporarily deployed to more-secrets September 13, 2021 07:42 Inactive
@andriikorotkov
Copy link
Contributor Author

andriikorotkov commented Sep 13, 2021

/publish connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1228706467
❌ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1228706467

@jrhizor jrhizor temporarily deployed to more-secrets September 13, 2021 08:14 Inactive
@andriikorotkov
Copy link
Contributor Author

andriikorotkov commented Sep 13, 2021

/test connector=connectors/destination-s3

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

@jrhizor jrhizor temporarily deployed to more-secrets September 13, 2021 13:53 Inactive
@andriikorotkov
Copy link
Contributor Author

andriikorotkov commented Sep 13, 2021

/publish connector=connectors/destination-s3

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

@jrhizor jrhizor temporarily deployed to more-secrets September 13, 2021 14:02 Inactive
@andriikorotkov andriikorotkov merged commit 4ffca60 into master Sep 13, 2021
@andriikorotkov andriikorotkov deleted the akorotkov/5149-destination-s3-fix branch September 13, 2021 14:10
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 SchemaParseException: Illegal initial character
6 participants