-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Destination S3V2: Fix: Avro names starting with numbers
- Loading branch information
1 parent
773bc45
commit cc86e19
Showing
2 changed files
with
29 additions
and
1 deletion.
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
21 changes: 21 additions & 0 deletions
21
airbyte-cdk/bulk/core/load/src/test/kotlin/io/airbyte/cdk/load/data/TransformationsTest.kt
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,21 @@ | ||
/* | ||
* Copyright (c) 2024 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.cdk.load.data | ||
|
||
import org.junit.jupiter.api.Test | ||
|
||
class TransformationsTest { | ||
@Test | ||
fun `test avro illegal start character`() { | ||
val unsafeName = "1d_view" | ||
assert(Transformations.toAvroSafeName(unsafeName) == "_1d_view") | ||
} | ||
|
||
@Test | ||
fun `test avro special characters`() { | ||
val unsafeName = "1d_view!@#$%^&*()" | ||
assert(Transformations.toAvroSafeName(unsafeName) == "_1d_view__________") | ||
} | ||
} |