-
Notifications
You must be signed in to change notification settings - Fork 23
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
TDL-20219: Add support for JSONL files #40
base: crest-master
Are you sure you want to change the base?
Conversation
…ount from 1 for JSONL files
tap_sftp/discover.py
Outdated
maximize_csv_field_width() | ||
yield ('csv', csv.get_row_iterator(item, options=options)) | ||
|
||
def get_JSONL_iterators(iterator, options): |
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.
Add function doc string.
tap_sftp/discover.py
Outdated
check_key_properties_and_date_overrides_for_jsonl_file(options, check_jsonl_sample_records) | ||
return records | ||
|
||
def check_key_properties_and_date_overrides_for_jsonl_file(options, jsonl_sample_records): |
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.
Add doc string for all the functions.
tap_sftp/discover.py
Outdated
return (empty_file, samples) | ||
|
||
def get_row_iterators_local(iterable, options={}, infer_compression=False): | ||
"""Accepts an interable, options and a flag to infer compression and yields |
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.
"""Accepts an interable, options and a flag to infer compression and yields | |
"""Accepts an iterable, options, and a flag to infer compression and yields |
NOTE: The build is failing as we have mocked some functions from the singer-encodings library as per the new code, but the singer-encodings master does not contain those files and functions. |
@@ -23,7 +23,7 @@ jobs: | |||
name: 'Unit Tests' |
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.
Do update the singer-encoding version.
@@ -54,6 +58,28 @@ def generate_simple_csv_lines_typeC(self, num_lines): | |||
lines.append([int_value, self.random_string_generator(), int_value*5, utils.strftime(start_datetime), int_value + random.random()]) | |||
return lines | |||
|
|||
def generate_simple_jsonl_lines_typeA(self, num_lines): |
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.
Add code comment for each function.
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.
Added comment for data generation functions.
NOTE: The tap-tester tests shall not run on CircleCi as the SFTP host used for testing seems down. We ran all the tests in our local environment and the tests are passing successfully. |
Description of change
TDL-20219: Add support for JSONL files
NOTE: This PR has to be merged after the PR #23 of
singer-encodings
is merged and released. After releasing the new version for the singer-encodings library, we need to update the singer-encodings version insetup.py
Manual QA steps
Risks
Rollback steps