PROJECT 101 · PYTHON SOURCE
Retail performance with Power BI
Study-specific code. Shared modules, dependency versions, and reproduction instructions are included in all project files.
Download Python file ↓"""Retail performance with Power BI: reproducible data mart and native Power BI source."""
from pathlib import Path
import sys
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT))
from powerbi.prepare import retail
from powerbi.author import author
from powerbi.validate import validate
def main():
project, metrics = retail()
report = author(101)
checks = validate(101)
return project, metrics, report, checks
if __name__ == '__main__':
import json
project, metrics, report, checks = main()
print(json.dumps({'metrics': metrics, 'report': report, 'checks': checks}, indent=2))