Skip to content
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

[airbyte-cdk] Fix tab delimiter configuration in CSV file type #35901

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class Config(OneOfOptionConfig):
@validator("delimiter")
def validate_delimiter(cls, v: str) -> str:
if v == r"\t":
return v
v = "\t"
if len(v) != 1:
raise ValueError("delimiter should only be one character")
if v in {"\r", "\n"}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ def test_given_from_csv_then_csv_has_header_row(self) -> None:

class CsvDelimiterTest(unittest.TestCase):
def test_tab_delimter(self):
assert CsvFormat(delimiter=r"\t").delimiter == '\\t'
assert CsvFormat(delimiter=r"\t").delimiter == '\t'
assert len(CsvFormat(delimiter=r"\t").delimiter) == 1
Loading