Conversation
server/utilities/constants/utilities/format_schema/response_messages.py
Outdated
Show resolved
Hide resolved
AwaisKamran
reviewed
May 19, 2025
AwaisKamran
reviewed
May 19, 2025
server/utilities/constants/utilities/format_schema/indexing_constants.py
Show resolved
Hide resolved
Updated mschema functions moved read_csv logic to bird_utils with multiple encodings
Updated mschema functions moved read_csv logic to bird_utils with multiple encodings
790af53 to
c2869ec
Compare
AwaisKamran
previously approved these changes
May 21, 2025
Mehak-Conrad
approved these changes
May 21, 2025
AwaisKamran
approved these changes
May 21, 2025
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
This PR implements the refactoring described in Refactor
format_schemaMethod inutility_functions.py.Summary of Changes
The
format_schemafunction has been refactored and moved to a separate module.The new flow is as follows:
format_schemaloads all table and column descriptions from CSV files into adescription_dict.A
schema_config_dictis constructed. This dictionary holds all schema-specific information, including:The
schema_config_dictis passed to each schema format function independently to generate the final schema output.Key Notes
Decouples DB Access from Schema Format Logic:
Even schema formats that don’t require DB access (e.g.,
Text) still receive a fully populatedschema_config_dict. Which can inadvertently lead to slow execution however this design promotes clear separation of concerns and paves the way for supporting multiple database connectors in the future.Removes External Dependencies:
Eliminates reliance on external packages like SQLAlchemy, reducing overhead and simplifying the dependency tree.
Dependent PRs
This PR depends on updates made to
utility_functions.pyin the following PR:Update Utility Functions
For Reviewers
Please review
utility_functions.pyonly after Update Utility Functions is merged to avoid unrelated diffs.