implement lazy schema discovery for streams with table configuration#5
Open
Vishal-Sharma-Acquia wants to merge 5 commits intomainfrom
Open
implement lazy schema discovery for streams with table configuration#5Vishal-Sharma-Acquia wants to merge 5 commits intomainfrom
Vishal-Sharma-Acquia wants to merge 5 commits intomainfrom
Conversation
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.
This pull request introduces lazy schema discovery for streams in the
tap_sumologicproject, improving how schemas are handled and loaded during stream processing. Instead of discovering or loading schemas during stream initialization, schemas are now loaded or inferred only when the stream is actually processed. This change enhances performance, flexibility, and robustness, especially for streams with dynamic or unknown schemas.Schema discovery improvements:
table_configparameter to theSearchJobStreamclass and updated its initialization to support lazy schema discovery, including handling cases where the schema is not provided and initializing a placeholder schema. (tap_sumologic/streams.py) [1] [2] [3]get_recordsmethod to perform schema discovery just before processing records if the schema has not already been discovered, updating schema and primary keys as needed. (tap_sumologic/streams.py)Configuration and workflow changes:
discover_streamsmethod to defer schema loading and inference until stream processing, passingNonefor schema and the full table config for lazy evaluation. (tap_sumologic/tap.py) [1] [2]discover_streamsto reflect the new lazy schema discovery process. (tap_sumologic/tap.py)CI workflow fix:
.github/workflows/ci_workflow.ymlby quoting the Python version3.10for consistency. (.github/workflows/ci_workflow.yml)