Skip to content

feat: add count with group by option#42

Merged
mattcristal merged 3 commits into
mainfrom
count-with-group-by
Feb 25, 2026
Merged

feat: add count with group by option#42
mattcristal merged 3 commits into
mainfrom
count-with-group-by

Conversation

@mattcristal

@mattcristal mattcristal commented Feb 25, 2026

Copy link
Copy Markdown
Owner

What was done

Something like this is now possible

# Per-table GROUP BY (count distinct groups in second table)
quack-diff count \
  -t sf.GOLD.FCT_INVOICE \
  -t "sf.RAW.INVOICE_LINES[salesid,linenum,tariffcode,linestartdate]"

# Add SUM validation alongside row counts
quack-diff count \
  -t sf.GOLD.FCT_INVOICE \
  -t "sf.RAW.INVOICE_LINES[salesid,linenum]" \
  --sum-column QUANTITY --sum-column qty

# Allow tolerances (percentage or absolute)
quack-diff count \
  -t bronze.orders -t silver.orders \
  --sum-column amount \
  --count-threshold 1% \
  --sum-threshold 500

@codecov-commenter

codecov-commenter commented Feb 25, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 68.66953% with 146 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.30%. Comparing base (9bdbcb3) to head (11aa07c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/quack_diff/cli/commands/count/__init__.py 67.42% 57 Missing ⚠️
src/quack_diff/core/connector.py 3.77% 51 Missing ⚠️
src/quack_diff/core/differ.py 55.73% 27 Missing ⚠️
src/quack_diff/cli/formatters.py 71.87% 9 Missing ⚠️
src/quack_diff/cli/output.py 87.50% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
- Coverage   80.68%   80.30%   -0.38%     
==========================================
  Files          34       35       +1     
  Lines        3142     3549     +407     
==========================================
+ Hits         2535     2850     +315     
- Misses        607      699      +92     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mattcristal
mattcristal merged commit f69216a into main Feb 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants