-
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
Add namespace test in destination acceptance test #10793
Merged
Merged
Changes from 3 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
2075116
Add namespace test for snowflake
tuliren 53e035b
Enable namespace test for bigquery
tuliren 72cbd76
Format code
tuliren 2292000
Capitalize test case id
tuliren 7c6fdc2
Update exception message to point to test case file
tuliren 668e0fe
Merge branch 'master' into liren/destination-namespace-charset
tuliren 82b4f58
Update snowflake name transformer to prepend underscore
tuliren e2d3506
Override convertStreamName instead of getIdentifier
tuliren e46e0f2
Add missing state message
tuliren 1a5e73d
Remove unused import
tuliren d7eda39
Disable more namespace test cases
tuliren 1435264
Dry method that mutates namespace
tuliren e698272
Pass through null
tuliren 241455a
Normalize namespace
tuliren cc7da57
Fix test case
tuliren 7cd900b
Revert consumer factory changes
tuliren 21bb4d4
Normalize namespace in catalog
tuliren bae6f39
Revert catalog normalization
tuliren acb6613
Enable namespace test for all snowflake destination tests
tuliren 8c4334b
Test namespace for both bigquery destination tests
tuliren 8fd8030
Add unit test for bigquery name transformer
tuliren 66f0c6e
Transform bigquery schema name
tuliren 64c359e
Fix avro name transformer
tuliren fcedace
Normalize avro namespace
tuliren 8f63404
Standardize namespace in gcs utils
tuliren 019d64a
Bump version for snowflake and bigquery
tuliren c14e92d
Enable namespace test for bigquery denormalized
tuliren 3f9111b
Dry bigquery denormalized acceptance test
tuliren e4be015
Revert some of the variable scope change
tuliren 6412b7b
Fix unit test
tuliren dcb8f98
Bump version
tuliren 89f9f35
Introduce getNamespace method
tuliren bf159c0
Implement getNamespace method for bigquery
tuliren b758324
Switch to getNamespace methods
tuliren 7b8708a
Update comments
tuliren 7ca043d
Fix bigquery denormalized acceptance test
tuliren 9e93a4a
Format code
tuliren c226dfc
Dry bigquery destination test
tuliren b9caead
Skip partition test for gcs mode
tuliren b4d789c
Merge branch 'master' into liren/destination-namespace-charset
tuliren c359284
Bump version
tuliren 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
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
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
14 changes: 14 additions & 0 deletions
14
...te-integrations/bases/standard-destination-test/src/main/resources/namespace_catalog.json
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,14 @@ | ||
{ | ||
"streams": [ | ||
{ | ||
"name": "data_stream", | ||
"json_schema": { | ||
"properties": { | ||
"field1": { | ||
"type": "boolean" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
...te-integrations/bases/standard-destination-test/src/main/resources/namespace_messages.txt
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 @@ | ||
{"type": "RECORD", "record": {"stream": "data_stream", "emitted_at": 1602637589000, "data": { "field1" : true }}} |
51 changes: 51 additions & 0 deletions
51
...integrations/bases/standard-destination-test/src/main/resources/namespace_test_cases.json
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,51 @@ | ||
[ | ||
{ | ||
"id": "s1-1", | ||
"description": "namespace are converted to lowercase", | ||
"namespace": "NAMESPACE", | ||
"enabled": true, | ||
"normalized": "namespace" | ||
}, | ||
{ | ||
"id": "s2-1", | ||
"description": "namespace allows alphabets, numbers, and underscore", | ||
"namespace": "Dest_1001_Namespace", | ||
"enabled": true, | ||
"normalized": "dest_1001_namespace" | ||
}, | ||
{ | ||
"id": "s2a-1", | ||
"description": "namespace romanization", | ||
"namespace": "namespace_with_spécial_character", | ||
"enabled": true, | ||
"normalized": "namespace_with_special_character" | ||
}, | ||
{ | ||
"id": "s2a-2", | ||
"description": "namespace romanization (japanese)", | ||
"namespace": "namespace_こんにちは", | ||
"enabled": false, | ||
"normalized": "namespace_konnichiwa" | ||
}, | ||
{ | ||
"id": "s3a-1", | ||
"description": "namespace starting with a number", | ||
"namespace": "99namespace", | ||
"enabled": true, | ||
"normalized": "99namespace" | ||
}, | ||
{ | ||
"id": "s3b-1", | ||
"description": "long namespace (300 characters)", | ||
"namespace": "a_300_characters_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo_namespace", | ||
"enabled": false, | ||
"normalized": "" | ||
}, | ||
{ | ||
"id": "s3c-1", | ||
"description": "reserved word (for future testing)", | ||
"namespace": "select", | ||
"enabled": false, | ||
"normalized": "" | ||
} | ||
] |
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
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
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.
nitpick: can these IDs be a little more descriptive (e.g.
all_caps
) to make them easier to cross-reference? right now if a test fails, it'll just log that cases1-1
failed, and then the developer would need to find this file to understand why.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.
Done. I also updated the exception message to ask people to look into the
namespace_test_case.json
for details.