Skip to content

Commit

Permalink
fix: Resolves bug in s3 source that did not support tab as a delimiter.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtiesling committed Feb 13, 2024
1 parent f6b4436 commit 6ce99e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ class Config(OneOfOptionConfig):

@validator("delimiter")
def validate_delimiter(cls, v: str) -> str:
if v == r'\t':
return v
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
@@ -0,0 +1,4 @@
from airbyte_cdk.sources.file_based.config.csv_format import CsvFormat

def test_csv_format_tab_delimited():
assert CsvFormat(delimiter=r"\t").delimiter == '\\t'

0 comments on commit 6ce99e5

Please sign in to comment.