-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Local CSV: add custom delimiter #17998
🎉 Destination Local CSV: add custom delimiter #17998
Conversation
Affected Connector ReportThe latest commit has removed all connector-related changes. There are no more dependent connectors for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add test cases for all new delimiter variants and also bump the version in Dockerfile
...t-integration/java/io/airbyte/integrations/destination/csv/CsvDestinationAcceptanceTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shipit!
/test connector=connectors/destination-csv
Build PassedTest summary info:
|
8f36dc3
to
2bc591b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
@natalyjazzviolin I think you need to change this code in
to this:
because argument providers are instantiated before the test class is instantiated and so they do not have access to non-static methods of the test class. |
heh.... we're doing some spicy reflection things to make this work (there's good reasons for this, @suhomud maybe remembers the details but basically this lets us write the tests without a ton of extra boilerplate. This was a change for the data types stuff). I'm fine hardcoding it to unblock this PR, but ideally we'd figure out how to make @suhomud do you know why it's trying to instantiate the argument provider class
|
public CSVDataArgumentsProvider(){}; | ||
@Override | ||
public Stream<? extends Arguments> provideArguments(final ExtensionContext context) { | ||
ProtocolVersion protocolVersion = getProtocolVersion(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the method io.Airbyte.integrations.standardtest.destination.argproviders.util.ArgumentProviderUtil.getProtocolVersion
should be used with test context as a param. So it will looks like:
public Stream<? extends Arguments> provideArguments(final ExtensionContext context) throws Exception {
ProtocolVersion protocolVersion = getProtocolVersion(context);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pointer @suhomud! Could you mention ArgumentProviderUtil.getProtocolVersion
in the comment for DestinationAcceptanceTest.getProtocolVersion
? The current comment says something about reflection, but it does not mention where we use reflection and it also does not provide guidance on how to use getProtocolVersion
I think, based on @suhomud 's comment, instead of what I suggested before, this should look like the following:
@suhomud does the above make sense? |
This comment was marked as duplicate.
This comment was marked as duplicate.
/test connector=connectors/destination-csv
Build PassedTest summary info:
|
/publish connector=connectors/destination-csv
if you have connectors that successfully published but failed definition generation, follow step 4 here |
* Adds delimeter to the spec file. Adds function to get delimeter from the config. * New delimiter works, but only checked raw airbyte tables. * Fixes testWriteFailure(), testWriteSuccess() still broken. * Corrects CSVFormat and now all tests pass. * Implements tab separator. * Corrects tooltip on destination settings page. * Creates CSV file with delimiters and prints it as stirng. * Adds try catch block for assertion. Deletes file after test run. * Removes separate format for tab dleimiter, it is not needed. * Cleans up code. * Adds missing bracket. * Adds files from incorrect rebase. * Corrects imports. * Fixes connectors base build. * Corrects Dockerfile version bump. Adds changelog. * Corrects getProtocolVersion method and makes CSVDataArgumentsProvider class static. * auto-bump connector version Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
What
Adds a dropdown with 5 delimiter options.
Closes #6734
Screen.Recording.2022-12-14.at.5.14.33.PM.mov
How
Recommended reading order
airbyte-integrations/connectors/destination-csv/src/main/resources/spec.json
airbyte-integrations/connectors/destination-csv/src/main/java/io/airbyte/integrations/destination/csv/CsvDestination.java
Tests:
airbyte-integrations/connectors/destination-csv/src/test/java/io/airbyte/integrations/destination/csv/CsvDestinationTest.java
airbyte-integrations/connectors/destination-csv/src/test-integration/java/io/airbyte/integrations/destination/csv/CsvDestinationAcceptanceTest.java
Dockerfile version bump:
airbyte-integrations/connectors/destination-csv/Dockerfile
Changelog:
docs/integrations/destinations/local-csv.md
🚨 User Impact 🚨
Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changesTests
Unit
Put your unit tests output here.
Integration
Put your integration tests output here.
Acceptance
Put your acceptance tests output here.