# alan-przybylski/python_dq_application architecture

> Architecture diagram of the GitHub repository alan-przybylski/python_dq_application, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alan-przybylski/python_dq_application
- Repository: https://github.com/alan-przybylski/python_dq_application

## Overview

DQ Studio is a local Tkinter data-quality workspace. Its principal workflow imports CSV or Databricks data into SQLite, prepares datasets, defines SQL rules, runs checks, and presents traceable results for investigation and export. Additional branches cover user and ticket management, SQL preview, rule-file exchange, and independently scheduled Databricks checks. Edges use README workflow statements and SOURCE INDEX references; unsampled subsystem details and relationships are not inferred beyond those references.

Main entry points: [`ui/data_quality.py`](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/data_quality.py) (Workspace windows), [`database/connection.py`](https://github.com/alan-przybylski/python_dq_application/blob/main/database/connection.py) (Local SQLite), [`ui/import_window.py`](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/import_window.py) (Import interface), [`ui/check_dq_panel.py`](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/check_dq_panel.py) (Quality report)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Desktop workspace"]
  node_entry["App entry<br/>[main.py]"]
  node_login["Sign-in<br/>[login_window.py]"]
  node_workspace_ui["Workspace windows<br/>[data_quality.py]"]
  node_accounts["Account management<br/>[accounts.py]"]
  node_sql_ui["SQL workspace<br/>[sql_workspace.py]"]
end

subgraph group_data["Dataset management"]
  node_imports_ui["Import interface<br/>[import_window.py]"]
  node_dataset_ops["Dataset import/export<br/>[datasets.py]"]
  node_table_edit["Table editor<br/>[table_editor.py]"]
  node_databricks_ui["Databricks interface"]
  node_databricks_fetch["Snapshot downloads"]
end

subgraph group_quality["Quality workflow"]
  node_rule_ui["Rule details<br/>[rule_details.py]"]
  node_rule_ops["Rule management<br/>[rules.py]"]
  node_rule_files["Rule file exchange<br/>[rule_files.py]"]
  node_quality_run["Check runner<br/>[dq_engine.py]"]
  node_report_ui["Quality report<br/>[check_dq_panel.py]"]
  node_report_data["Run reports<br/>[dq_report.py]"]
  node_ticket_ops["DQ tickets<br/>[tickets.py]"]
  node_tickets_ui["Ticket interface<br/>[tickets_window.py]"]
end

subgraph group_platform["Persistence and integrations"]
  node_databricks_sync["Remote checks and sync<br/>[databricks_sync.py]"]
  node_databricks_contract["Databricks contract"]
  node_scheduled_job["Scheduled job"]
  node_sqlite[("Local SQLite<br/>[connection.py]")]
end

node_user(("Desktop user"))

node_user -->|"launches"| node_entry
node_entry -->|"opens"| node_login
node_user -->|"uses"| node_workspace_ui
node_workspace_ui -->|"opens import"| node_imports_ui
node_imports_ui -->|"imports CSV"| node_dataset_ops
node_dataset_ops -->|"writes data"| node_sqlite
node_imports_ui -->|"opens editor"| node_table_edit
node_imports_ui -->|"opens download"| node_databricks_ui
node_databricks_ui -->|"downloads snapshot"| node_databricks_fetch
node_databricks_fetch -->|"saves snapshot"| node_sqlite
node_workspace_ui -->|"opens rules"| node_rule_ui
node_rule_ui -->|"edits rules"| node_rule_ops
node_rule_ui -->|"exchanges files"| node_rule_files
node_workspace_ui -->|"opens checks"| node_report_ui
node_report_ui -->|"runs checks"| node_quality_run
node_quality_run -->|"reads and records"| node_sqlite
node_quality_run -->|"syncs tickets"| node_ticket_ops
node_report_ui -->|"loads reports"| node_report_data
node_workspace_ui -->|"opens tickets"| node_tickets_ui
node_tickets_ui -->|"manages tickets"| node_ticket_ops
node_login -->|"authenticates"| node_accounts
node_accounts -->|"reads and writes"| node_sqlite
node_workspace_ui -->|"opens editor"| node_sql_ui
node_report_ui -->|"starts remote checks"| node_databricks_sync
node_databricks_sync -->|"builds payload"| node_databricks_contract
node_databricks_sync -->|"stores mappings"| node_sqlite
node_scheduled_job -->|"uses runner"| node_databricks_sync

click node_entry "https://github.com/alan-przybylski/python_dq_application/blob/main/main.py"
click node_login "https://github.com/alan-przybylski/python_dq_application/blob/main/ui/login_window.py"
click node_workspace_ui "https://github.com/alan-przybylski/python_dq_application/blob/main/ui/data_quality.py"
click node_imports_ui "https://github.com/alan-przybylski/python_dq_application/blob/main/ui/import_window.py"
click node_dataset_ops "https://github.com/alan-przybylski/python_dq_application/blob/main/logic/datasets.py"
click node_table_edit "https://github.com/alan-przybylski/python_dq_application/blob/main/logic/table_editor.py"
click node_databricks_ui "https://github.com/alan-przybylski/python_dq_application/blob/main/ui/databricks_window.py"
click node_databricks_fetch "https://github.com/alan-przybylski/python_dq_application/blob/main/logic/databricks_import.py"
click node_rule_ui "https://github.com/alan-przybylski/python_dq_application/blob/main/ui/rule_details.py"
click node_rule_ops "https://github.com/alan-przybylski/python_dq_application/blob/main/logic/rules.py"
click node_rule_files "https://github.com/alan-przybylski/python_dq_application/blob/main/logic/rule_files.py"
click node_quality_run "https://github.com/alan-przybylski/python_dq_application/blob/main/logic/dq_engine.py"
click node_report_ui "https://github.com/alan-przybylski/python_dq_application/blob/main/ui/check_dq_panel.py"
click node_report_data "https://github.com/alan-przybylski/python_dq_application/blob/main/logic/dq_report.py"
click node_ticket_ops "https://github.com/alan-przybylski/python_dq_application/blob/main/logic/tickets.py"
click node_tickets_ui "https://github.com/alan-przybylski/python_dq_application/blob/main/ui/tickets_window.py"
click node_accounts "https://github.com/alan-przybylski/python_dq_application/blob/main/logic/accounts.py"
click node_sql_ui "https://github.com/alan-przybylski/python_dq_application/blob/main/ui/sql_workspace.py"
click node_databricks_sync "https://github.com/alan-przybylski/python_dq_application/blob/main/logic/databricks_sync.py"
click node_databricks_contract "https://github.com/alan-przybylski/python_dq_application/blob/main/integrations/databricks_contract.py"
click node_scheduled_job "https://github.com/alan-przybylski/python_dq_application/blob/main/databricks_dq_job.py"
click node_sqlite "https://github.com/alan-przybylski/python_dq_application/blob/main/database/connection.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_login,node_workspace_ui,node_accounts,node_sql_ui,node_user toneBlue
class node_imports_ui,node_dataset_ops,node_table_edit,node_databricks_ui,node_databricks_fetch toneAmber
class node_rule_ui,node_rule_ops,node_rule_files,node_quality_run,node_report_ui,node_report_data,node_ticket_ops,node_tickets_ui toneMint
class node_databricks_sync,node_databricks_contract,node_scheduled_job,node_sqlite toneRose
```

## Components

### Desktop workspace

- [App entry](https://github.com/alan-przybylski/python_dq_application/blob/main/main.py): `main.py`
- [Sign-in](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/login_window.py): `ui/login_window.py`
- [Workspace windows](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/data_quality.py): `ui/data_quality.py`
- [Account management](https://github.com/alan-przybylski/python_dq_application/blob/main/logic/accounts.py): `logic/accounts.py`
- [SQL workspace](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/sql_workspace.py): `ui/sql_workspace.py`

### Dataset management

- [Import interface](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/import_window.py): `ui/import_window.py`
- [Dataset import/export](https://github.com/alan-przybylski/python_dq_application/blob/main/logic/datasets.py): `logic/datasets.py`
- [Table editor](https://github.com/alan-przybylski/python_dq_application/blob/main/logic/table_editor.py): `logic/table_editor.py`
- [Databricks interface](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/databricks_window.py): `ui/databricks_window.py`
- [Snapshot downloads](https://github.com/alan-przybylski/python_dq_application/blob/main/logic/databricks_import.py): `logic/databricks_import.py`

### Quality workflow

- [Rule details](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/rule_details.py): `ui/rule_details.py`
- [Rule management](https://github.com/alan-przybylski/python_dq_application/blob/main/logic/rules.py): `logic/rules.py`
- [Rule file exchange](https://github.com/alan-przybylski/python_dq_application/blob/main/logic/rule_files.py): `logic/rule_files.py`
- [Check runner](https://github.com/alan-przybylski/python_dq_application/blob/main/logic/dq_engine.py): `logic/dq_engine.py`
- [Quality report](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/check_dq_panel.py): `ui/check_dq_panel.py`
- [Run reports](https://github.com/alan-przybylski/python_dq_application/blob/main/logic/dq_report.py): `logic/dq_report.py`
- [DQ tickets](https://github.com/alan-przybylski/python_dq_application/blob/main/logic/tickets.py): `logic/tickets.py`
- [Ticket interface](https://github.com/alan-przybylski/python_dq_application/blob/main/ui/tickets_window.py): `ui/tickets_window.py`

### Persistence and integrations

- [Remote checks and sync](https://github.com/alan-przybylski/python_dq_application/blob/main/logic/databricks_sync.py): `logic/databricks_sync.py`
- [Databricks contract](https://github.com/alan-przybylski/python_dq_application/blob/main/integrations/databricks_contract.py): `integrations/databricks_contract.py`
- [Scheduled job](https://github.com/alan-przybylski/python_dq_application/blob/main/databricks_dq_job.py): `databricks_dq_job.py`
- [Local SQLite](https://github.com/alan-przybylski/python_dq_application/blob/main/database/connection.py): `database/connection.py`

### Other components

- **Desktop user**

## Connections

- Desktop user → App entry: launches (evidence: `README.md`)
- App entry → Sign-in: opens (evidence: `main.py`)
- Desktop user → Workspace windows: uses (evidence: `README.md`)
- Workspace windows → Import interface: opens import
- Import interface → Dataset import/export: imports CSV (evidence: `ui/import_window.py`)
- Dataset import/export → Local SQLite: writes data (evidence: `logic/datasets.py`)
- Import interface → Table editor: opens editor (evidence: `ui/import_window.py`)
- Import interface → Databricks interface: opens download (evidence: `ui/import_window.py`)
- Databricks interface → Snapshot downloads: downloads snapshot (evidence: `ui/databricks_window.py`)
- Snapshot downloads → Local SQLite: saves snapshot (evidence: `logic/databricks_import.py`)
- Workspace windows → Rule details: opens rules (evidence: `ui/data_quality.py`)
- Rule details → Rule management: edits rules (evidence: `ui/rule_details.py`)
- Rule details → Rule file exchange: exchanges files (evidence: `ui/data_quality.py`)
- Workspace windows → Quality report: opens checks (evidence: `ui/data_quality.py`)
- Quality report → Check runner: runs checks (evidence: `ui/check_dq_panel.py`)
- Check runner → Local SQLite: reads and records (evidence: `logic/dq_engine.py`)
- Check runner → DQ tickets: syncs tickets (evidence: `logic/dq_engine.py`)
- Quality report → Run reports: loads reports (evidence: `ui/check_dq_panel.py`)
- Workspace windows → Ticket interface: opens tickets (evidence: `README.md`)
- Ticket interface → DQ tickets: manages tickets (evidence: `README.md`)
- Sign-in → Account management: authenticates
- Account management → Local SQLite: reads and writes (evidence: `logic/accounts.py`)
- Workspace windows → SQL workspace: opens editor (evidence: `README.md`)
- Quality report → Remote checks and sync: starts remote checks (evidence: `ui/check_dq_panel.py`)
- Remote checks and sync → Databricks contract: builds payload (evidence: `logic/databricks_sync.py`)
- Remote checks and sync → Local SQLite: stores mappings (evidence: `logic/databricks_sync.py`)
- Scheduled job → Remote checks and sync: uses runner (evidence: `databricks_dq_job.py`)
