How jzsmoreno/pyorchdb works
Main Components
• ETL Orchestration Core – Represented by the PyOrchDB package (the “PyOrchDB” directory, notably main.py and utility modules) that includes configuration files (catalog.py, config_data.yml, table_names.yml) and common tools.
• Job Execution and Pipelines – Found in the “src” directory which contains:
– Job scripts (inside src/jobs) such as pipeline_job.yml, job_workflow.py, ml_complete_job.py, upload_model.py, and experiment_job.yml. These are the components responsible for launching or coordinating ETL tasks.
– The central pipeline definition (pipeline.py) which likely glues the workflows together.
– Infrastructure and application templates (under src/templates) that manage resource creation, deletion, or configuration (e.g., infra_template.json, func_template.json).
– Supporting scripts, including PowerShell scripts (run.ps1, run_template_infra.ps1) that kick off processes.
• Configuration and Deployment – The project includes multiple Dockerfiles (one in the top-level directory and one in src) and configuration files (config.yml in src, requirements.txt at multiple levels) to ensure the environments are reproducible.
• Logging and Monitoring – A “logs” directory indicates that logging is captured, and it even provides a README to clarify its purpose.
• External Services and Azure Components – As detailed in the README, the system interacts with:
– An Azure Storage account (with a “landing zone” for data, including raw and processed data).
– An Azure SQL Server database where processed (parquet) data is loaded.
– Azure Machine Learning for running some of the ETL processes or experiments.
• Developer/CI Integration – GitHub Actions workflows (in .github) for code-quality and release management.
Relationships and Interactions
• The ETL Core (PyOrchDB) acts as the orchestrator of the data pipeline, reading configurations from YAML files and invoking utility functions.
• The “src” module contains the job definitions and the pipeline, which use both local scripts and Azure resources. Data flows from the Storage account through the transformation processes defined in the pipeline and then into the SQL database.
• PowerShell scripts (run.ps1, run_template_infra.ps1) take in parameters and coordinate the setup and execution steps – these scripts directly interface with the Azure CLI and set up the necessary cloud resources.
• Dockerfiles indicate the possibility of packaging the solution for isolation or deployment, with dependencies outlined in requirements.txt.
Architectural Patterns and Design Principles
• Separation of Concerns – The project is clearly partitioned between infrastructure deployment, ETL processing, and job orchestration.
• Hybrid Processing – There is a clear division between processes that run locally (Python scripts, PowerShell, Docker) and those managed via Azure ML.
• Modularity – Jobs are grouped in the “jobs” folder and templates in “templates,” making it straightforward to add or modify ETL steps independently.
• Declarative Infrastructure – YAML templates and resource definitions (as seen with .yml files in both jobs and templates) are used to define and automate resource creation.
Relevant Technologies and Tools
• Python – For orchestrating ETL workflows and utility operations.
• YAML Configuration Files – To specify job parameters and infrastructure settings.
• Docker – To containerize the environment (ensuring consistent CLI and Python versions).
• Azure CLI/Azure ML – For managing and executing the cloud-based parts of the ETL.
• PowerShell Scripts – For local orchestration and for interfacing with Azure CLI commands.
• GitHub Actions – For CI/CD workflows including code quality checks and releases.
Specific Elements
• “ETL Orchestration Core (PyOrchDB)”
• “Job Definitions & Pipeline (src/jobs & pipeline.py)”
• “Infrastructure Templates (src/templates & run.ps1)”
• “Data Sources: Azure Storage Account (Raw & Processed Data)”
• “Data Sink: Azure SQL Server Database”
• “Azure ML for Managed Processes”
• From Storage (raw data) towards ETL processes.
• From ETL processes towards data transformations and finally insertion into SQL.
• Bi-directional interactions when applicable (e.g., configuration feedback loops).
• Local components (e.g., Python scripts, Docker containers) vs. Cloud components (Azure Storage, SQL, ML)
• Configuration and deployment scripts vs. runtime job pipelines.