Skip to content

Add CDA-ETL module with initial implementation and basic functionality#1732

Draft
RyanM-RMA wants to merge 2 commits into
USACE:developfrom
RyanM-RMA:feature/add_etl_processing
Draft

Add CDA-ETL module with initial implementation and basic functionality#1732
RyanM-RMA wants to merge 2 commits into
USACE:developfrom
RyanM-RMA:feature/add_etl_processing

Conversation

@RyanM-RMA
Copy link
Copy Markdown
Collaborator

@RyanM-RMA RyanM-RMA commented May 15, 2026

Includes the addition of the following:

  • Dockerfile and docker-compose for containerizing the service.
  • Gradle build configuration for the module.
  • Core ETL pipeline components: configuration, session management, location, project, and timeseries processing.
  • Environment variable management with etl.env.example.
  • Utility functions and cache handling.
  • Initial set of unit tests for basic validation (e.g., configuration handling).

Summary

Add module for Extract Transform and Load (ETL) between CDA API's.

Related Issue

Closes https://jira.hecdev.net/browse/REGI-481

Validation

Tested by running the gradle and docker-compose processes, verifying data is valid through running CWMSVue and REGI.

Checklist

  • AI tools used

Includes the addition of the following:
- Dockerfile and docker-compose for containerizing the service.
- Gradle build configuration for the module.
- Core ETL pipeline components: configuration, session management, location, project, and timeseries processing.
- Environment variable management with `etl.env.example`.
- Utility functions and cache handling.
- Initial set of unit tests for basic validation (e.g., configuration handling).
@@ -0,0 +1,14 @@
services:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why separate from the root docker-compose.yml? I'd think the defaults should be sourced for CWBI Test and destination the CDA service container

Comment thread cda-etl/build.gradle
final def envFile = 'etl.env'
final def reqFile = 'requirements.txt'

tasks.register('installRequirements', Exec) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Take a look at what Stephen did on: https://github.com/DOI-BOR/WTMP-Python-Plotting/blob/main/build.gradle using a gradle plugin to manage python.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

which we already do for Node JS. So makes sense to use a plugin for python as well.

# SOFTWARE.
import cwms

class SessionManager:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@krowvin
Copy link
Copy Markdown
Collaborator

krowvin commented May 15, 2026

@Enovotny

Might be some ideas in here we can use with cwms-cli

I thought this was a novel idea. Setting locations in the env for reuse

Ie
self.locations = os.getenv("LOCATIONS", "").split(",")

- Split core functionality into modular components for improved clarity and maintainability, including separate processing for locations, projects, and timeseries.
- Introduced caching logic in `cache_util.py` for optimized data retrieval and storage.
- Added threading utilities for concurrent task execution in `threading_util.py`.
- Enhanced `SessionManager` logic with dynamic session initialization.
- Updated Gradle build to include a `runEtlUnitTests` task for streamlined testing.
- Improved environment variable examples in `etl.env.example`.
- Introduced comprehensive unit tests for locations, projects, and timeseries modules.
- Various bug fixes and restructured imports for consistency.
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.

4 participants