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

🎉 New Destination: DuckDB #17494

Merged
merged 40 commits into from
Feb 7, 2023
Merged

🎉 New Destination: DuckDB #17494

merged 40 commits into from
Feb 7, 2023

Conversation

sspaeti
Copy link
Contributor

@sspaeti sspaeti commented Oct 1, 2022

What

  • initial version of a DuckDB destination
  • I added the dbt normalization

How

  • Implemented with the Python CDK very similar to destination-sqlite. The code is mostly a copy of that.

Recommended reading order

  1. Read the implementation of the duckdb destination
  2. check out the added dbt normalization
  3. check the comment here for some specialties that didn't work without help initially.

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
    • Connector's bootstrap.md. See description and examples
    • 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

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
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub by running the /publish command described here
  • After the connector is published, connector added to connector index as described here
  • Seed specs have been re-generated by building the platform and committing the changes to the seed spec files, as 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

Tests

Unit
> Task :airbyte-integrations:connectors:destination-duckdb:unitTest
Name                                Stmts   Miss  Cover
-------------------------------------------------------
destination_duckdb/__init__.py          2      0   100%
destination_duckdb/destination.py      70     48    31%
-------------------------------------------------------
TOTAL                                  72     48    33%

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 21s
33 actionable tasks: 21 executed, 12 up-to-date
Integration
> Task :airbyte-integrations:connectors:destination-duckdb:customIntegrationTests
Name                                Stmts   Miss  Cover
-------------------------------------------------------
destination_duckdb/__init__.py          2      0   100%
destination_duckdb/destination.py      70     15    79%
-------------------------------------------------------
TOTAL                                  72     15    79%

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 13s
33 actionable tasks: 15 executed, 18 up-to-date
Acceptance

Not found for Python

@sspaeti sspaeti self-assigned this Oct 1, 2022
@github-actions github-actions bot added the area/connectors Connector related issues label Oct 1, 2022
@sspaeti sspaeti mentioned this pull request Oct 1, 2022
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Oct 14, 2022
@sspaeti sspaeti marked this pull request as ready for review October 14, 2022 14:58
@sspaeti sspaeti requested a review from marcosmarxm October 14, 2022 15:05
@sspaeti sspaeti marked this pull request as draft November 2, 2022 14:10
@sspaeti
Copy link
Contributor Author

sspaeti commented Nov 2, 2022

Converting PR back to "draft" and trying to add normalization at the same time. Any help or hints are appreciated; there are quite a lot of files touched for normalization.

I followed the most recent destination: #15592.

@github-actions github-actions bot added area/platform issues related to the platform area/worker Related to worker normalization labels Nov 2, 2022
@sspaeti sspaeti temporarily deployed to more-secrets November 2, 2022 14:15 Inactive
@sspaeti sspaeti temporarily deployed to more-secrets November 25, 2022 11:33 Inactive
@sspaeti sspaeti changed the title New Destination: DuckDB 🎉 New Destination: DuckDB Nov 25, 2022
@sspaeti sspaeti temporarily deployed to more-secrets November 25, 2022 13:35 Inactive
@sspaeti sspaeti temporarily deployed to more-secrets January 24, 2023 10:34 — with GitHub Actions Inactive
@sspaeti sspaeti temporarily deployed to more-secrets January 24, 2023 10:34 — with GitHub Actions Inactive
@sspaeti
Copy link
Contributor Author

sspaeti commented Jan 24, 2023

@edgao I finished the code review:

🎉 this is exciting! I left a number of comments. They're mostly nitpicky, but the stuff in destination.py is maybe actually important. But feel free to tell me I don't know what I'm talking about, you're the expert on this destination :)

Thank so much for your thoughtful review. I checked all cases, improved where possible, tested some things, and had to revert (all in the conversations/threads above). Now I have a working copy again with your changes. IMO it's ready to merge.

Also - when you run the integration tests locally, does it generate any sql files in normalization_test_output? (iirc it should, and you should commit those as well)

There is, but there are only two files normalization_test_output/duckdb/test_nested_streams/dbt_project.yml and normalization_test_output/duckdb/test_simple_streams/dbt_project.yml. Hope that's ok.

@sspaeti sspaeti dismissed marcosmarxm’s stale review January 24, 2023 10:43

old and resolved

@github-actions
Copy link
Contributor

github-actions bot commented Jan 24, 2023

Airbyte Code Coverage

There is no coverage information present for the Files changed

Total Project Coverage 24.53%

@octavia-squidington-iv octavia-squidington-iv removed the CDK Connector Development Kit label Jan 24, 2023
@sspaeti sspaeti temporarily deployed to more-secrets January 24, 2023 10:56 — with GitHub Actions Inactive
@sspaeti sspaeti temporarily deployed to more-secrets January 24, 2023 10:57 — with GitHub Actions Inactive
@sspaeti sspaeti requested a review from edgao January 25, 2023 07:19
@ryankfu
Copy link
Contributor

ryankfu commented Jan 31, 2023

There's a couple conflicting files but overall looks good. I don't see any things that I would follow up on aside from the DESTINATION_SIZE_LIMIT you mentioned before

@marcosmarxm is there anything else that I should look out for when it comes to certifying a connector? This would be the first time I've done such a review and mostly been following the building a python destination documentation

For instance, would we need to set up the integration tests internally or does the build passing give that sanity check?

@sspaeti sspaeti requested a review from a team as a code owner February 2, 2023 16:12
Copy link
Contributor

@ryankfu ryankfu left a comment

Choose a reason for hiding this comment

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

LGTM

…s/summary/' to 'cloudfront.net/tests/summary/connectors/'
@sspaeti sspaeti temporarily deployed to more-secrets February 7, 2023 09:34 — with GitHub Actions Inactive
@sspaeti sspaeti temporarily deployed to more-secrets February 7, 2023 09:34 — with GitHub Actions Inactive
@sspaeti sspaeti merged commit 2bbc4f6 into master Feb 7, 2023
@sspaeti sspaeti deleted the duckdb-destination branch February 7, 2023 10:33
danidelvalle pushed a commit to danidelvalle/airbyte that referenced this pull request Feb 9, 2023
This is the first version of the DuckDB destination. There are potential edge cases that still need to be taken care of. But looking forward to your feedback.
@sspaeti sspaeti mentioned this pull request Feb 13, 2023
37 tasks
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/destination/duckdb normalization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants