TDL-20219: Add support for JSONL files#40
Open
hpatel41 wants to merge 20 commits intocrest-masterfrom
Open
Conversation
added 12 commits
August 23, 2022 17:39
…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): |
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.
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.
Suggested change
| """Accepts an interable, options and a flag to infer compression and yields | |
| """Accepts an iterable, options, and a flag to infer compression and yields |
Contributor
Author
|
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. |
dbshah1212
reviewed
Oct 11, 2022
| @@ -23,7 +23,7 @@ jobs: | |||
| name: 'Unit Tests' | |||
There was a problem hiding this comment.
Do update the singer-encoding version.
dbshah1212
reviewed
Oct 11, 2022
| 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.
Add code comment for each function.
Contributor
Author
There was a problem hiding this comment.
Added comment for data generation functions.
Contributor
Author
|
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. |
dbshah1212
approved these changes
Oct 12, 2022
savan-chovatiya
approved these changes
Oct 12, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of change
TDL-20219: Add support for JSONL files
NOTE: This PR has to be merged after the PR #23 of
singer-encodingsis merged and released. After releasing the new version for the singer-encodings library, we need to update the singer-encodings version insetup.pyManual QA steps
Risks
Rollback steps