-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐞 Fix invalid char in snowflake & bigquery namespace (#10793)
* Add namespace test for snowflake * Enable namespace test for bigquery * Format code * Capitalize test case id * Update exception message to point to test case file * Update snowflake name transformer to prepend underscore * Override convertStreamName instead of getIdentifier * Add missing state message * Remove unused import * Disable more namespace test cases We don't want to introduce changes that will affect existing connections for now. * Dry method that mutates namespace * Pass through null * Normalize namespace * Fix test case * Revert consumer factory changes * Normalize namespace in catalog * Revert catalog normalization * Enable namespace test for all snowflake destination tests * Test namespace for both bigquery destination tests * Add unit test for bigquery name transformer * Transform bigquery schema name * Fix avro name transformer * Normalize avro namespace * Standardize namespace in gcs utils * Bump version for snowflake and bigquery * Enable namespace test for bigquery denormalized * Dry bigquery denormalized acceptance test * Revert some of the variable scope change * Fix unit test * Bump version * Introduce getNamespace method * Implement getNamespace method for bigquery * Switch to getNamespace methods * Update comments * Fix bigquery denormalized acceptance test * Format code * Dry bigquery destination test * Skip partition test for gcs mode * Bump version
- Loading branch information
Showing
32 changed files
with
621 additions
and
609 deletions.
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
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" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
2 changes: 2 additions & 0 deletions
2
...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,2 @@ | ||
{"type": "RECORD", "record": {"stream": "data_stream", "emitted_at": 1602637589000, "data": { "field1" : true }}} | ||
{"type": "STATE", "state": { "data": {"start_date": "2022-08-17"}}} |
54 changes: 54 additions & 0 deletions
54
...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,54 @@ | ||
[ | ||
{ | ||
"id": "S1-1", | ||
"description": "namespace are converted to lowercase", | ||
"namespace": "NAMESPACE", | ||
"enabled": false, | ||
"normalized": "namespace", | ||
"comment": "this test case is disabled because it is not critical and we are not ready to change the behavior of existing destinations yet" | ||
}, | ||
{ | ||
"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": "", | ||
"comment": "this test case is disabled because it is for future testing only" | ||
}, | ||
{ | ||
"id": "S3C-1", | ||
"description": "reserved word", | ||
"namespace": "select", | ||
"enabled": false, | ||
"normalized": "", | ||
"comment": "this test case is disabled because it is for future testing only" | ||
} | ||
] |
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
Oops, something went wrong.