Skip to content

SAC-30337: Add dynamic schema workflow with discovery support#1

Merged
satyendra101 merged 8 commits intogl-masterfrom
SAC-30337/dynamic-schema-discovery
Apr 1, 2026
Merged

SAC-30337: Add dynamic schema workflow with discovery support#1
satyendra101 merged 8 commits intogl-masterfrom
SAC-30337/dynamic-schema-discovery

Conversation

@satyendra101
Copy link
Copy Markdown
Collaborator

Description of change

  • Added dynamic schema extraction workflow from ODATA $metadata endpoint
  • Handled authentication workflow with OAuth2 using static assertion (for local testing)
  • Added code to run discovery and generate catalog

Manual QA steps

Risks

Rollback steps

  • revert this branch

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a metadata-driven (OData $metadata) discovery workflow to dynamically generate Singer catalogs/schemas and introduces a runtime stream implementation to sync discovered entity sets from SAP SuccessFactors, including an OAuth2 (SAML bearer / refresh token / static token) authentication client.

Changes:

  • Implement dynamic discovery by parsing OData $metadata into Singer schemas + metadata and emitting a generated catalog.
  • Add a dynamic stream/sync framework (including parent/child relationship inference) with schema emission and bookmark handling.
  • Introduce an HTTP client with OAuth token refresh and mapped error handling for SAP SuccessFactors responses.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tap_sap_success_factors/__init__.py Tap entrypoint wiring for discover/sync execution and required config keys.
tap_sap_success_factors/auth.py Builds OAuth token request payloads (SAML bearer / refresh token).
tap_sap_success_factors/client.py Adds HTTP client, token management, retries/backoff, and error mapping.
tap_sap_success_factors/discover.py Runs dynamic discovery and constructs a Singer Catalog.
tap_sap_success_factors/exceptions.py Defines exception hierarchy and HTTP status → exception mapping.
tap_sap_success_factors/metadata_discovery.py Parses OData $metadata and infers schemas/relationships/replication metadata.
tap_sap_success_factors/schema.py Emits Singer schema messages and wires child streams for syncing.
tap_sap_success_factors/sync.py Orchestrates syncing selected streams with parent/child handling.
tap_sap_success_factors/streams/__init__.py Declares streams package.
tap_sap_success_factors/streams/abstracts.py Implements the base stream sync logic (pagination, bookmarks, child sync).
tap_sap_success_factors/streams/dynamic.py Implements runtime stream instances backed by discovered catalog entries.
sample_config.json Updates sample config keys to match the new client configuration model.
README.md Updates example configuration to reflect new config keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Fix grammar: 'due permissions' -> 'due to permissions' in sync.py
- Fix update_currently_syncing to use state.pop() avoiding null state write
- Update type hint to Optional[str] on update_currently_syncing
- Use tap_stream_id consistently and add parent-stream fallback in child_map
- Pass pre-built child_map to write_schema to avoid O(n) catalog re-traversal
- Handle 204 No Content and empty bodies in _make_request to avoid JSON decode errors
- Guard int() cast in _get_retry_after with ValueError fallback for HTTP-date headers
@satyendra101 satyendra101 requested a review from RushiT0122 March 2, 2026 12:51
* SAC-30338: Add sync logic for the tap along with unittests and spikes

* Update tests to use unittests

* Resolve Copilot comments

* Add discovery time stream probe and prune strategy

* Remove redundant files and code lines

* Integration tests (#3)

* Add Integration tests for the tap

* Update integration testsand yml file

* Resolve Copilot Comments
@satyendra101 satyendra101 merged commit 8388b31 into gl-master Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants