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 snowflake: use 200MB batches #34502

Merged
merged 15 commits into from Feb 8, 2024
Merged

Conversation

edgao
Copy link
Contributor

@edgao edgao commented Jan 24, 2024

closes #31741

test sync running - https://cloud.airbyte.com/workspaces/b61bc266-ef3c-460c-af2f-f70da4a2993c/connections/a54f466c-83a6-40e7-ae86-6e79961040d5/job-history#7796162::0. Verified that it now has 200MB batches:
image

Previous syncs took 500 - 800 COPY statements for the 10M faker dataset; new syncs are taking around 70 COPYs. Total sync runtime is still a bit under 1 hour.

make the factory class more useful; add a builder. Move the 50MB default into the factory class.

new StagingConsumerFactory.Builder() sounds dumb, I'm open to naming suggestions 🤷

@edgao edgao requested a review from a team as a code owner January 24, 2024 21:28
Copy link

vercel bot commented Jan 24, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Feb 8, 2024 7:06pm

Copy link
Contributor

github-actions bot commented Jan 24, 2024

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@edgao edgao changed the title Destination snowflake: use 200MB batches 🐛 Destination snowflake: use 200MB batches Jan 24, 2024
@@ -37,16 +37,6 @@ class AsyncFlush implements DestinationFlushFunction {
private final long optimalBatchSizeBytes;
private final boolean useDestinationsV2Columns;

public AsyncFlush(final Map<StreamDescriptor, WriteConfig> streamDescToWriteConfig,
Copy link
Contributor Author

@edgao edgao Jan 24, 2024

Choose a reason for hiding this comment

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

this constructor was only ever called from the overload createAsync() method. Delete it.

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Jan 25, 2024
@edgao edgao changed the base branch from master to edgao/fix_snowflake January 25, 2024 17:14
Base automatically changed from edgao/fix_snowflake to master January 25, 2024 17:25
Copy link
Contributor

@gisripa gisripa left a comment

Choose a reason for hiding this comment

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

minor nit (not a blocker) but overall looks good. One step towards cleaning this class 😅

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Feb 8, 2024
@edgao
Copy link
Contributor Author

edgao commented Feb 8, 2024

/publish-java-cdk

🕑 https://github.com/airbytehq/airbyte/actions/runs/7832983807
❌ Publish Java CDK version=0.17.0 failed!

@edgao
Copy link
Contributor Author

edgao commented Feb 8, 2024

/publish-java-cdk force=true

🕑 https://github.com/airbytehq/airbyte/actions/runs/7834208048
✅ Successfully published Java CDK version=0.17.0!

@edgao edgao merged commit c32c2f2 into master Feb 8, 2024
22 checks passed
@edgao edgao deleted the edgao/snowflake/batch_size branch February 8, 2024 19:30
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 21, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
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 CDK Connector Development Kit checklist-action-run connectors/destination/redshift connectors/destination/snowflake
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update snowflake async to use 200mb batches again
3 participants