Skip to content

Complete SExI SQL take-home solution - #90

Draft
KacperStanczyk wants to merge 4 commits into
sbms4d:qa_testfrom
KacperStanczyk:submission/sql-take-home
Draft

Complete SExI SQL take-home solution#90
KacperStanczyk wants to merge 4 commits into
sbms4d:qa_testfrom
KacperStanczyk:submission/sql-take-home

Conversation

@KacperStanczyk

Copy link
Copy Markdown

Summary

  • rebuild the employee, expense, supplier, and invoice tables from the supplied source files;
  • add reports for manager cycles, expense offenders, and supplier payment plans;
  • add focused pytest coverage for the required expense report and document the assumptions and run commands.

Design decisions

  • exployee_id is treated as a typo because the CSV and downstream tasks use employee_id;
  • the requested invoice_ammount column spelling is preserved;
  • cycle output contains actual loop members and excludes employees whose path only enters a loop;
  • invoice payments start at the current month end, finish before the due month, and put any cent-level rounding difference in the final payment.

Checks

  • Trino 483: all six SQL files executed successfully;
  • each loader executed twice after a clean container restart;
  • pytest 9.1.1 with trino 0.338.0: 2 passed;
  • manual validation: 9 employees, exact expense totals, 3 cycle rows, and 16 payment rows with zero final balance for every supplier;
  • Python compilation, dependency versions, git diff --check, and secret scan passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant