How parreirao2/power-bi-tools works
Project Type and Purpose
• This repository is not a single monolith but a collection of four standalone desktop utilities and one C# script tool, each designed for specific data‐centric tasks:
• PageSwitcher: a Power BI (.pbix) page‐management GUI.
• InfoHelper: a C# Tabular Editor macro for column profiling.
• Sample Generator + SQL Tools: a PyQt5 GUI for SQL analysis, CSV sample generation, and CREATE TABLE generation.
• Excel Validator: a Python GUI that validates batches of CSV/Excel files against a template.
• Each Python‐based tool is packaged into an .exe via PyInstaller; InfoHelper is a .csx script loaded at runtime by Tabular Editor.
File Structure Analysis
• Top‐level folders:
• Excel Validator/
• InfoHelper/
• Page Editor/ (contains PageSwitcher)
• Sample Generator + SQL Tools/
• assets/ (shared README images, GIFs)
• README.md
• .py or GUI script files
• .spec files (PyInstaller build configs)
• build/… subfolders containing the packaged executables, local Python libraries, and Tcl/Tk files for GUI.
• InfoHelper consists of a single .csx script—no build folder—as it runs inside Tabular Editor’s C# Scripting host.
README Insights
• Each project section details its features, GUI flows (with animated GIFs), how it interacts with files (PBIX, CSV, Excel), and dependencies:
• Python 3.x, PySimpleGUI or PyQt5, Pandas, Faker, regex, Matplotlib.
• Tabular Editor’s scripting engine and DAX for InfoHelper.
Main Components & Interactions
A. PageSwitcher (Python + PySimpleGUI)
• UI Layer: menus, pop-ups for page/visual edits
• Logic Layer: PBIX parsing, JSON manipulation
• File I/O: reads .pbix, writes new .pbix versions
B. Sample Generator + SQL Tools (Python + PyQt5)
• UI Layer: forms for word search, CSV generation, file upload
• Logic Layer: regex word finder, Faker data generator, CSV analyzer → CREATE TABLE DDL
• File I/O: reads/writes CSV, produces SQL scripts
C. Excel Validator (Python + PySimpleGUI)
• UI Layer: folder & template selectors, progress bar
• Logic Layer: Pandas validation engine, Matplotlib graphing
• File I/O: reads CSVs, template .xlsx, writes multi-sheet analysis .xlsx
D. InfoHelper (C# script)
• Runtime: Tabular Editor host
• Logic Layer: inspects selected Tabular model column, generates DAX measures
• UI: Tabular Editor pop-up output window
• Shared Runtime Environment
• Python 3 Interpreter + Embedded stdlib (via PyInstaller) + Tcl/Tk (for GUIs)
• .NET CLR hosting InfoHelper.
Architectural Patterns
• Each tool follows a simple two-layer pattern: UI Layer (GUI toolkit) ↔ Business Logic Layer
• File‐system boundary: all file inputs/outputs are via local FS (no network or DB).
• Packaging pipeline: source → PyInstaller (.spec) build → single‐folder exe distribution.
Essential Elements
• Clear labels: tool name, UI vs. logic, packaging.
• Rounded rectangles for GUIs
• Rectangles for processing modules
• Parallelogram for the build pipeline.