• Home
  • Project
    Introduction
    • Introduction
    • Background and Motivation
    • What is a Good Timetable?
    • Project Aims and Scope
  • Graph Data
    Model
    • Graph vs Relational Data Models
    • Graph Data Model for Timetabling
    • Early Insights
    • Model Expansion
    • Graphing Time
  • Data
    Pipeline
    • ETL Overview
    • Approach
    • Configuration and Logging
    • Extract
    • Transform
    • Google Drive Load
    • Neo4j Load
    • Reflection
  • Timetable
    Metrics
    • Timetable Metrics
    • Metric Aggregations
    • Implementing Metrics
    • TQI Summary
  • Final
    Thoughts
  • Appendices
    & Extras
    • Appendix Table of Contents
    • References
    • Acknowledgements
  • Word
  1. Data Pipeline
  2. ETL Overview
  • Home
  • Project Introduction
    • Introduction
    • Background and Motivation
    • What is a Good Timetable?
    • Project Aims and Scope
  • Graph Data Model
    • Graph vs Relational Data Models
    • Graph Data Model for Timetabling
    • Early Insights
    • Model Expansion
    • Graphing Time
  • Data Pipeline
    • ETL Overview
    • Approach
    • Configuration and Logging
    • Extract
    • Transform
    • Google Drive Load
    • Neo4j Load
    • Reflection
  • Timetable Metrics
    • Timetable Metrics
    • Metric Aggregations
    • Implementing Metrics
    • TQI Summary
  • Final Thoughts
  • Appendices
    • Random Graph Generator
    • Technology Stack
    • Configuration
    • Anonymisation
    • ETL Summary and Code
      • ETL Summary
      • ETL Code
      • Config and Misc
      • Extract-SQL
      • Extract
      • Google Drive Load
      • Transform
      • Neo4j Load
    • Neo4j & Cypher Code
      • Cypher Queries
      • Creating Nodes and Relationships
      • Deleting Nodes and Relationships
      • General Queries
      • Count Queries
      • Hard (timetabling) Constraints
      • Student Clashes
      • Soft Constraints
      • Rooms and Spaces
      • Perspectives
      • Blue Skies Opportunities
  • Supervision
    • Supervision
    • Notes Example 1
    • Notes Example 2
    • Notes Example 3
  • References
  • Acknowledgements

On this page

  • High-level Architecture
  • Design Principles
    • Security and Data Protection
    • Modularity, Scalability and Automation
    • Error Handling and Logging
    • User configurable
  • Implementation Approach
  • Upcoming Sections
  1. Data Pipeline
  2. ETL Overview

Data Engineering Overview

A main objective of my project is the development of a data pipeline which efficiently and securely transfers selected university timetabling data from a relational database (MS SQL) to a graph database (Neo4j).

This section provides an overview of the pipeline architecture, fundamental design principles, implementation approach and key learning takeaways.

High-level Architecture

The data pipeline consists of these core stages:

  1. Extraction: Data is extracted from the SQL database and saved into CSV files.
  2. Transformation: CSV files are processed, cleaned, transformed, merged, and anonymised using Python.
  3. Intermediate Storage: Processed CSVs are uploaded to Google Drive (required for Neo4j Aura free instance).
  4. Loading: Clean data is processed and loaded into Neo4j.

Overview cluster_D_E A SQL Database B CSV Files A->B 1. π—˜π—«π—§π—₯𝗔𝗖𝗧: Filter C Processed CSV Files B->C 2. 𝗧π—₯𝗔𝗑𝗦𝗙𝗒π—₯𝗠: Validate, Process & Anonymise D Google Drive C->D 3. π”ππ‹πŽπ€πƒ E Neo4j Aura DB D:w->E 4. (Optional) Load Schema D:e->E 5. π—Ÿπ—’π—”π——: Load & Validate Data

Data Pipeline Overview
Figure 1

Design Principles

Several β€œbest practices” in data handling, processing, and database management were incorporated in developing this ETL. The data pipeline is built on several core design principles:

Design Principles

I started with a strong sense of what I wanted to build - a modular, scalable, secure and configurable design - however, what exactly this meant was only discovered during the development process.

Given project constraints - deadline, word-limits, resources, data, technology - it is fair to say that compromises were made. That said, it was important that the final artefact is one that can be developed further for specific business use-cases.

Security and Data Protection

Security, Access, Anonymisation

  • Secure access controls
  • Data anonymisation
  • Controlled handling of personally identifiable information

Modularity, Scalability and Automation

Modularity, Scalability, Validity, Automation

  • Distinct, interoperable modules (extract, process, upload, load)
  • Ability to handle increased data volume and complexity
  • Automation, where possible
  • Configurable data processing options (e.g., data chunking, row processing)
  • Optimised, where possible

Error Handling and Logging

Logging and Error Handling

  • Robust error handling
  • Comprehensive logging for troubleshooting and auditing

User configurable

Configurability

  • Flexible configuration options for data filtering, directory controls, and schema handling

Implementation Approach

The pipeline was developed using an iterative approach, allowing for continuous discovery, refinement and improvement.

Crucial aspects of the implementation include:

  • Technology Stack: Python for data processing, MS SQL for source data, Neo4j for the target graph database. See Technology Stack for more details.
  • Cloud Integration: Utilisation of Google Drive for intermediate storage, compatible with Neo4j Aura.
  • Validation: Implemented at various stages to ensure data integrity and fitness for processing.
  • Testing: Continuous simulated unit testing to ensure that components are behaving as expected.

Upcoming Sections

The following sections will delve into specific implementation details of each stage, demonstrating how these principles are put into practice, before reflecting on lessons learned and potential future enhancements.

Graphing Time
Approach

Copyright 2024, Petter LΓΆvehagen

 

Built with Quarto