Skip to content

Commit 5cad26b

Browse files
Regenerate example outputs
1 parent 3f47807 commit 5cad26b

2 files changed

Lines changed: 73 additions & 0 deletions

File tree

examples/row_compare.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Row Compare
2+
3+
Compare rows using a dataset YAML with file inputs
4+
5+
## Command
6+
7+
```bash
8+
sqlcompare dataset tests/datasets/row_compare/dataset.yaml
9+
```
10+
11+
## Output
12+
13+
```text
14+
Prepared dataset tables: sqlcompare.dataset_dataset_998aa249_previous, sqlcompare.dataset_dataset_998aa249_new
15+
✅ Ensured schema 'sqlcompare' exists
16+
Joining tables: sqlcompare.dataset_dataset_998aa249_previous and sqlcompare.dataset_dataset_998aa249_new
17+
Rows only in current dataset: 1
18+
+----+-------+--------+--------+
19+
| id | name | amount | status |
20+
+----+-------+--------+--------+
21+
| 4 | delta | 40 | open |
22+
+----+-------+--------+--------+
23+
Rows only in previous dataset: 1
24+
+----+-------+--------+--------+
25+
| id | name | amount | status |
26+
+----+-------+--------+--------+
27+
| 2 | bravo | 20 | open |
28+
+----+-------+--------+--------+
29+
🚨 Differences in values for common rows: 2 rows in total
30+
31+
📊 Difference statistics by column:
32+
+-------------+------------+
33+
| COLUMN_NAME | diff_count |
34+
+-------------+------------+
35+
| amount | 1 |
36+
| name | 1 |
37+
+-------------+------------+
38+
39+
✅ Columns with no differences: status
40+
41+
📋 Sample differences (first 10 rows):
42+
+----+--------+--------+---------+
43+
| id | COLUMN | BEFORE | CURRENT |
44+
+----+--------+--------+---------+
45+
| 1 | name | alpha | alfa |
46+
| 1 | amount | 10 | 11 |
47+
+----+--------+--------+---------+
48+
🔎 To review the diff, run: sqlcompare analyze-diff compare_sqlcompare_dataset_dataset_998aa249_previous_sqlcompare_dataset_dataset_998aa249_new_20260104_025829_b28946b5
49+
💡 Tips: --stats for per-column counts, --missing-current/--missing-previous for row-only, --column <name> to filter, --list-columns to inspect available fields.
50+
```

examples/stats_compare.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Stats Compare
2+
3+
Compare statistics between two CSV files
4+
5+
## Command
6+
7+
```bash
8+
sqlcompare table tests/datasets/stats_compare/previous.csv tests/datasets/stats_compare/current.csv --stats
9+
```
10+
11+
## Output
12+
13+
```text
14+
📊 Table statistics comparison:
15+
+-------------+-----------+----------+------------+-----------+---------------+--------------+-----------+------------+---------------+
16+
| COLUMN_NAME | PREV_ROWS | NEW_ROWS | PREV_NULLS | NEW_NULLS | PREV_DISTINCT | NEW_DISTINCT | ROWS_DIFF | NULLS_DIFF | DISTINCT_DIFF |
17+
+-------------+-----------+----------+------------+-----------+---------------+--------------+-----------+------------+---------------+
18+
| id | 5 | 6 | 0 | 0 | 5 | 6 | 1 | 0 | 1 |
19+
| segment | 5 | 6 | 0 | 0 | 3 | 3 | 1 | 0 | 0 |
20+
| amount | 5 | 6 | 0 | 0 | 4 | 5 | 1 | 0 | 1 |
21+
| notes | 5 | 6 | 2 | 1 | 1 | 1 | 1 | -1 | 0 |
22+
+-------------+-----------+----------+------------+-----------+---------------+--------------+-----------+------------+---------------+
23+
```

0 commit comments

Comments
 (0)