Oracle WMS API Client
Relevant source files
The following files were used as context for generating this wiki page:
The Oracle WMS API Client serves as the core interface for interacting with the Oracle Warehouse Management System (WMS). Within the flext-tap-oracle-wms project, this client is responsible for establishing authenticated connections, discovering warehouse entities, and performing paginated data extraction for ETL workflows. It is implemented as a wrapper around the flext-oracle-wms library, providing Singer-compliant streams and catalog discovery.
Sources: src/flext_tap_oracle_wms/README.md:37-41, src/flext_tap_oracle_wms/tap.py:27-30
Architecture and Integration
The API client architecture follows the FLEXT ecosystem patterns, inheriting from Singer SDK base classes to provide a standardized interface for data movement. It acts as a bridge between the raw Oracle WMS REST API and the Singer protocol requirements used by tools like Meltano.
Component Relationship
The client relies on flext-oracle-wms for low-level HTTP communication and flext-core for logging and result handling.
Sources: src/flext_tap_oracle_wms/README.md:65-72, src/flext_tap_oracle_wms/tap.py:175-192
Configuration and Authentication
The client requires specific configuration parameters to authenticate and target the correct Oracle WMS instance. It supports multiple authentication methods, primarily Basic Auth and OAuth2.
Key Configuration Parameters
| Parameter | Type | Description |
|---|---|---|
base_url | String | The URL of the Oracle WMS instance. |
username | String | WMS user for basic authentication. |
password | String (Secret) | Password for the WMS user. |
company_code | String | The WMS company identifier. |
facility_code | String | The WMS facility identifier. |
api_version | String | Target API version (e.g., v10). Defaults to v1. |
page_size | Integer | Number of records to request per page (max 1250). |
Sources: meltano.yml:45-103, src/flext_tap_oracle_wms/tap.py:34-56, tests/integration/test_wms_connection.py:33-43
Connection Lifecycle
The client lifecycle involves initialization, connectivity validation, and session management.
Entity Discovery and Stream Management
A critical function of the API client is dynamic entity discovery. Rather than hardcoding every available WMS table, the client queries the API metadata to identify available resources such as inventory, locations, items, and orders.
Discovery Logic
The discovercatalog_typed method invokes the client's discover_entities capability. It builds a SingerCatalog where each entity is represented as a stream with default full-table replication or incremental replication if a replication key is detected.
Sources: src/flext_tap_oracle_wms/tap.py:214-250, tests/integration/test_wms_connection.py:75-88
Stream Extraction Workflow
- Request Construction: The client builds operation arguments, including
limit(page size) andoffsetor HATEOAS links. - Filtering: Applies
company_codeandfacility_codefilters to every request. - Data Retrieval: Iterates through paginated responses until all records for a stream are exhausted.
Sources: src/flext_tap_oracle_wms/tap.py:252-276, tests/integration/test_wms_connection.py:108-132
Performance and Reliability
The client implements several features to ensure reliable data extraction from enterprise environments:
- Pagination: Uses a custom
WMSPaginatorto handle Oracle's HATEOAS-based next-page links. - Rate Limiting: Supports
max_requests_per_minuteto prevent API throttling. - Timeouts: Configurable request timeouts (defaulting to 30 seconds) to handle slow network conditions.
- Verification: SSL verification can be toggled for environments with custom certificates.
Sources: meltano.yml:148-164, tests/integration/test_wms_connection.py:33-43, src/flext_tap_oracle_wms/README.md:76-78
Implementation Example
The following snippet demonstrates how the FlextTapOracleWms class instantiates and uses the underlying WMS client:
# From src/flext_tap_oracle_wms/tap.py
def wms_client(self) -> FlextOracleWmsUtilities.OracleWms.Client:
"""Return a started WMS client instance."""
if self._wms_client is None:
wms_settings = FlextOracleWmsSettings.model_validate({
"base_url": str(self.flext_config.base_url),
"username": self.flext_config.username,
"password": self.flext_config.password.get_secret_value(),
"timeout": float(self.flext_config.timeout),
})
client = FlextOracleWmsUtilities.OracleWms.Client(settings=wms_settings)
client.start()
self._wms_client = client
return self._wms_client
Sources: src/flext_tap_oracle_wms/tap.py:186-206
Summary
The Oracle WMS API Client is the foundational component for synchronizing warehouse data. By leveraging FLEXT core patterns and Singer SDK standards, it provides a robust, configurable, and discoverable interface for extracting complex logistics data from Oracle WMS into modern data warehouses. Its design emphasizes architectural simplification, aiming to reduce complexity while maintaining full support for enterprise-grade WMS APIs.
Sources: src/flext_tap_oracle_wms/README.md:104-107, pyproject.toml:23-32