feat: Add schema alias for default_target_schema setting#3454
Open
KaruturiS wants to merge 8 commits into
Open
feat: Add schema alias for default_target_schema setting#3454KaruturiS wants to merge 8 commits into
schema alias for default_target_schema setting#3454KaruturiS wants to merge 8 commits into
Conversation
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a new configuration alias so that the existing Class diagram for updated TARGET_SCHEMA_CONFIG Property with schema aliasclassDiagram
class Property {
+string name
+string title
+string description
+ConfigType type
+list~string~ aliases
}
class TargetSchemaConfig {
+Property default_target_schema
}
TargetSchemaConfig --> Property : uses
class DefaultTargetSchemaProperty {
+name = default_target_schema
+aliases = [schema]
+title = Default_Target_Schema
+description = Default_target_database_schema_name
}
DefaultTargetSchemaProperty --|> Property
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3454 +/- ##
=======================================
Coverage 93.86% 93.86%
=======================================
Files 73 73
Lines 5946 5946
Branches 729 729
=======================================
Hits 5581 5581
Misses 271 271
Partials 94 94
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
schema alias for default_target_schema setting
1 task
59e8ee4 to
1a4dabb
Compare
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
1a4dabb to
7885dc5
Compare
… HTTP request for a stream (meltano#3483) ## Related - meltano#1606 - MeltanoLabs/tap-dbt#135 - PoC: reservoir-data/tap-bitly#494 ## Summary by Sourcery Introduce a dedicated HTTPRequest abstraction in the REST stream layer and update tap-dummyjson to use it for request construction and parameter handling. New Features: - Add an HTTPRequest dataclass for REST streams, including customizable query parameter encoding and reusable request construction via RESTStream.get_http_request. Enhancements: - Refactor RESTStream.prepare_request to build requests from HTTPRequest instances and standardize URL parameter typing and encoding. - Simplify DummyJSONAuthenticator to always set the Authorization header after ensuring a valid token. - Update tap-dummyjson client pagination to override get_http_request instead of get_url_params for setting paging parameters. Tests: - Add a unit test covering custom HTTPRequest.encode_params behavior with safe characters in query parameters. ## Summary by Sourcery Introduce an HTTPRequest abstraction and context for RESTStream to construct and customize HTTP requests, and migrate pagination and client patterns to use it instead of get_url_params while deprecating prepare_request overrides. New Features: - Add an HTTPRequest dataclass and HTTPRequestContext for representing REST stream HTTP requests and their pagination/context. - Expose RESTStream.get_http_request for building per-request URL, headers, params, and payload from stream context and paginator state. Enhancements: - Refactor RESTStream request preparation to build PreparedRequest objects from HTTPRequest instances with standardized payload typing and parameter encoding. - Update built-in taps (dummyjson, GitLab) and the cookiecutter tap template to implement pagination by overriding get_http_request instead of get_url_params. - Improve paginator typing for RESTStream and BaseAPIPaginator implementations. - Emit deprecation warnings when prepare_request is overridden, including when the override is in an intermediate base class. - Adjust documentation examples to show customizing pagination by modifying HTTPRequest rather than URL parameter dicts. Documentation: - Add reference stubs for HTTPRequest and HTTPRequestContext and update pagination and incremental replication guides to document get_http_request-based pagination patterns. Tests: - Add unit tests for HTTPRequest parameter encoding, including custom safe characters and non-string parameter values. - Extend REST pagination and metrics tests to cover the new get_http_request usage and deprecation warnings for prepare_request overrides. --------- Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com> Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
edgarrmondragon
requested changes
Apr 24, 2026
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 PR adds the 'schema' alias to the default_target_schema setting in TARGET_SCHEMA_CONFIG. This allows users to use either key in their configuration, resolving issue #2766.
Summary by Sourcery
New Features:
default_target_schemaorschemakey in TARGET_SCHEMA_CONFIG.