Getting Started
Relevant source files
The following files were used as context for generating this wiki page:
The flext-target-oracle-wms project is a Singer-compliant target designed for loading data into Oracle Warehouse Management System (WMS) Cloud SaaS. It leverages the flext-core ecosystem to provide production-grade features such as dependency injection, observability, and robust error handling. The system transforms incoming Singer protocol messages (SCHEMA, RECORD, STATE) into Oracle-compatible payloads for enterprise-level data integration.
Sources: README.md:5-7, examples/README.md:15-20
Core Concepts and Architecture
The target operates by consuming standard Singer messages and orchestrating them through a series of internal managers and transformers. The architecture is built on the SingerTargetOracleWMS class which coordinates with specialized utility components to handle data mapping, type conversion, and stream management.
System Components
The following table summarizes the primary internal components used during the data loading lifecycle:
| Component | Responsibility |
|---|---|
CatalogManager | Maintains the registry of streams and their associated schemas. |
WMSTableManager | Maps Singer streams to Oracle-friendly table names (typically uppercased). |
WMSTypeConverter | Handles scalar type conversion from Singer types to Oracle WMS formats. |
WMSDataTransformer | Mutates record payloads, including key normalization and value conversion. |
WMSSchemaMapper | Maps Singer schema definitions to Oracle DDL structures. |
Sources: tests/unit/test_quality.py:73-95, src/flext_target_oracle_wms/_utilities/helpers.py:100-160
Operational Data Flow
The target follows a standard ETL pattern where messages are processed sequentially. Data is typically validated against a schema before being transformed and buffered for batch insertion.
The diagram shows the logical flow of Singer messages from ingestion to transformation and state emission.
Sources: tests/unit/test_target.py:150-170, src/flext_target_oracle_wms/_utilities/helpers.py:80-95
Installation and Prerequisites
The project requires Python 3.13+ and utilizes poetry for dependency management. It depends on several flext-* ecosystem libraries, including flext-core, flext-db-oracle, and flext-observability.
- Install Dependencies:
poetry install - Setup Environment:
Configuration can be provided via environment variables or asettings.jsonfile.
Sources: pyproject.toml:23-35, examples/README.md:144-150
Configuration
The target requires specific authentication details to connect to the Oracle WMS Cloud environment.
| Parameter | Type | Description |
|---|---|---|
base_url | String | The Oracle WMS Cloud SaaS URL (e.g., https://example.wms.oracle.com). |
username | String | API Username for authentication. |
password | String | API Password for authentication. |
environment | String | Deployment environment (e.g., demo, production). |
batch_size | Integer | Number of records to process before flushing (Default: 1000). |
load_method | String | Data loading strategy: APPEND_ONLY, UPSERT, or MERGE. |
Sources: examples/README.md:46-55, src/flext_target_oracle_wms/_utilities/helpers.py:25-45
Basic Implementation Example
Users can instantiate the target using the SingerTargetOracleWMS class or the provided CLI. In standard operations, the target reads lines from standard input.
from flext_target_oracle_wms import SingerTargetOracleWMS
settings = {
"base_url": "https://example.wms.oracle.com",
"username": "demo_user",
"password": "demo_password",
"batch_size": 100
}
target = SingerTargetOracleWMS(settings)
setup_result = target.setup()
if setup_result.success:
# Process Singer messages from a list of strings
target.process_lines(singer_message_lines)
Sources: examples/README.md:61-75, examples/01_basic_usage.py:35-45, tests/unit/test_target.py:155-165
Data Transformation Logic
The WMSDataTransformer ensures that incoming data conforms to Oracle's expectations. Key behaviors include:
- Key Normalization: All record keys are converted to UPPERCASE to match Oracle column naming conventions.
- Type Conversion: The
WMSTypeConverterhandles the translation of Singer scalars (integer, number, boolean) into formats suitable for Oracle's API. - Complex Types: Objects and arrays are serialized to JSON strings during conversion.
Sequence illustrating the internal transformation loop for a single record.
Sources: src/flext_target_oracle_wms/_utilities/helpers.py:75-120, tests/unit/test_sinks.py:90-100
Summary
The flext-target-oracle-wms provides a structured, enterprise-ready implementation for Oracle WMS data ingestion. By utilizing the flext-core utility patterns and specialized WMS helpers, it ensures data integrity, consistent naming conventions, and scalable performance for large-scale data synchronization tasks.