-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add Namespace Field. #2704
Merged
Merged
Add Namespace Field. #2704
Changes from 7 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
8a28bc6
Add namespace field to AirbyteStream.
5e069c9
Implement the schema logic. Some slight refactor for readability.
19e2d60
Write tests for new Postgresql and Jdbc Destination on new schema beh…
c05ccde
WIP: Introduce namespace into the TestDestination.
bae860f
WIP: Introduce integration test method into test destination class. W…
b08fd1c
Get Postgres Integration and Local test working. Get JDBC Integration…
7a108db
Remove duplicated tests.
4ed3945
Make sure all table names are properly sanitised for RedshiftCopyDest…
403b361
Get RedshiftTests working.
7fbe15a
Merge remote-tracking branch 'origin' into davinchia/add-namespace-field
e74008e
Is this it?
60ea355
Fix postgres test.
dac3864
Update JDBC and Snowflake tests.
c3183ea
Refactor code.
b7ce158
Formatting changes.
9f12f4e
Make sure to create schema for RedshiftCopier.
d96b1c9
Update spec.json(s) to display Default Schema title. Also add title w…
a345fbe
Change namespace prefix to table prefix.
dca8144
Merge remote-tracking branch 'origin' into davinchia/add-namespace-field
3ffde44
Use namespace instead of schema in description.
1fec464
Remove accidentally committed print statements.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
airbyte-commons/src/main/java/io/airbyte/commons/functional/CheckedBiFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2020 Airbyte | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package io.airbyte.commons.functional; | ||
|
||
public interface CheckedBiFunction<First, Second, Result, E extends Throwable> { | ||
|
||
Result apply(First first, Second second) throws E; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...src/main/java/io/airbyte/integrations/standardtest/destination/DataArgumentsProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2020 Airbyte | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package io.airbyte.integrations.standardtest.destination; | ||
|
||
import java.util.stream.Stream; | ||
import org.junit.jupiter.api.extension.ExtensionContext; | ||
import org.junit.jupiter.params.provider.Arguments; | ||
import org.junit.jupiter.params.provider.ArgumentsProvider; | ||
|
||
/** | ||
* Class encapsulating all arguments required for Standard Destination Tests. | ||
* | ||
* All files defined here can be found in src/main/resources of this package. | ||
*/ | ||
public class DataArgumentsProvider implements ArgumentsProvider { | ||
|
||
public static final CatalogMessageTestConfigPair EXCHANGE_RATE_CONFIG = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also allows us to centralise naming and references to the various test configs here instead of scattered manually typed strings. |
||
new CatalogMessageTestConfigPair("exchange_rate_catalog.json", "exchange_rate_messages.txt"); | ||
public static final CatalogMessageTestConfigPair EDGE_CASE_CONFIG = | ||
new CatalogMessageTestConfigPair("edge_case_catalog.json", "edge_case_messages.txt"); | ||
|
||
@Override | ||
public Stream<? extends Arguments> provideArguments(ExtensionContext context) { | ||
return Stream.of( | ||
Arguments.of(EXCHANGE_RATE_CONFIG.messageFile, EXCHANGE_RATE_CONFIG.catalogFile), | ||
Arguments.of(EDGE_CASE_CONFIG.messageFile, EDGE_CASE_CONFIG.catalogFile) | ||
// todo - need to use the new protocol to capture this. | ||
// Arguments.of("stripe_messages.txt", "stripe_schema.json") | ||
); | ||
|
||
} | ||
|
||
public static class CatalogMessageTestConfigPair { | ||
|
||
final String catalogFile; | ||
final String messageFile; | ||
|
||
public CatalogMessageTestConfigPair(String catalogFile, String messageFile) { | ||
this.catalogFile = catalogFile; | ||
this.messageFile = messageFile; | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Broke this out since the
TestDestination
class was getting quite large.