A command-line tool for ETL operations with Oracle databases.
- Download BOM EO Forecast data and export to Excel/Parquet
- Upload data from files to Oracle database tables
- Secure credential management
- Configurable via YAML configuration
- Comprehensive logging
- Python 3.8 or higher
- Oracle Instant Client (18.5 or 19.3 recommended)
- Default paths are:
C:\DevTools\Oracle Instant Client 18.5\instantclient_18_5C:\Oracle\instantclient_19_3
- If installed elsewhere, update the paths in
config/config.yaml
- Default paths are:
# Clone the repository
git clone https://github.com/yourusername/oracle-etl-tool.git
cd oracle-etl-tool
# Install the package in development mode
pip install -e .If you received the code as a zip file or through other means:
# Navigate to the project directory
cd path/to/oracle_etl_tool
# Install the package in development mode
pip install -e .The tool provides a simple command-line interface:
oracle-etl [--reset-credentials] [--debug] <command> [options]
Available commands:
download-forecast: Download BOM EO Forecast data and export to Excel/Parquetupload-data: Upload data from a file to the Oracle database
oracle-etl download-forecast [--no-excel] [--no-parquet] [--open-drive]
Options:
--no-excel: Skip Excel file generation--no-parquet: Skip Parquet file generation--open-drive: Open Google Drive in browser after completion
oracle-etl upload-data [--file FILENAME] [--table TABLENAME]
Options:
--file: File to upload (if not specified, will prompt for selection)--table: Target table name (default: t_ibp_cons_rdc)
oracle-etl --reset-credentials
Configuration is stored in config/config.yaml. The main settings include:
- Database connection details
- Oracle client paths
- SQL queries
- Application settings
- Ensure Oracle Instant Client is installed on your computer
- Open Command Prompt (search for "cmd" in Windows)
- Navigate to the tool directory (use
cdcommand) - Run:
pip install -e .
- Open Command Prompt
- Navigate to the tool directory
- Run:
oracle-etl download-forecast - Enter your Oracle database credentials when prompted
- The tool will create a folder with the forecast data files
- Open Command Prompt
- Navigate to the tool directory
- Run:
oracle-etl upload-data - Enter your Oracle database credentials when prompted
- Select the file to upload from the displayed list
- The tool will upload the data to the database
If you encounter any issues:
- Check the logs in the
logsdirectory - Run the command with
--debugfor more detailed logging - If credentials are incorrect, run with
--reset-credentials