DBDelve
DBDelve는 Rust 기반 빠른 다중 엔진 데이터베이스 클라이언트, 무료 오픈소스, 텔레메트리 없음
두 테이블을 값 단위로 비교합니다. 후보 테이블을 기준 테이블의 컬럼 타입에 맞춰 변환한 뒤 검증할 수 있습니다
Compares two tables value by value. A candidate table can be checked against a benchmark whose column types are taken as the truth, with the candidates columns cast to those types first, or two tables
개발 도구RGitHub @pedrobtz온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
Compares two tables value by value. A candidate table can be checked against a benchmark whose column types are taken as the truth, with the candidates columns cast to those types first, or two tables can be checked for equality as peers. Rows are aligned on their identity columns, numeric measures are compared within an optional tolerance, and the result is a long data.table' with one row per compared value that traces back to the source rows of both inputs.
README 전체를 불러오는 중입니다.
README 전문 보기 ↗dazdiff compares two tables value by value. Its one main function,
diff_table(), answers one of two questions:
mode = "benchmark", the
default.) The benchmark's column types are the truth. The tested table's
columns are cast to them, and its extra columns are dropped.mode = "equal".) The tables are peers:
every column must be in both, with the same type, and nothing is cast.The result is a data.table with one row per compared value. Each row traces
back to its source row in both tables.
Install the released version from CRAN:
install.packages("dazdiff")
Or the development version from GitHub:
# install.packages("pak")
pak::pak("pedrobtz/dazdiff")
A benchmark table, and the same data after a round trip through storage. On
the way, the column names changed case, the ids became text, units came back
as a double, a load timestamp was added, one row was lost and one was added:
library(dazdiff)
benchmark <- data.frame(
id = c(1L, 2L, 3L, 4L),
region = c("north", "south", "east", "west"),
amount = c(100, 200, 300, 400),
units = c(10L, 20L, 30L, 40L)
)
stored <- data.frame(
ID = c("1", "2", "3", "5"),
Region = c("north", "south", "east", "north"),
Amount = c(100, 200.5, 300, 500),
Units = c(10.4, 20, 30, 50),
loaded_at = "2026-09-29"
)
d <- diff_table(benchmark, stored, by = c("id", "region"), measures = "numeric+integer")
#> Dropped column(s) of `y` that the benchmark `x` does not have: loaded_at.
#> Truncated 1 value(s) while casting to the reference types:
#> Units: 1 (10.4 -> 10)
d
#> Key: <ID, REGION, metric>
#> ID REGION metric row_id_x row_id_y value_x value_y diff abs_diff rel_diff status
#> <int> <char> <char> <int> <int> <num> <num> <num> <num> <num> <fctr>
#> 1: 1 north AMOUNT 1 1 100 100.0 0.0 0.0 0.000000000 same
#> 2: 1 north UNITS 1 1 10 10.0 0.0 0.0 0.000000000 same
#> 3: 2 south AMOUNT 2 2 200 200.5 0.5 0.5 0.002493766 changed
#> 4: 2 south UNITS 2 2 20 20.0 0.0 0.0 0.000000000 same
#> 5: 3 east AMOUNT 3 3 300 300.0 0.0 0.0 0.000000000 same
#> 6: 3 east UNITS 3 3 30 30.0 0.0 0.0 0.000000000 same
#> 7: 4 west AMOUNT 4 NA 400 NA NA NA NA only_x
#> 8: 4 west UNITS 4 NA 40 NA NA NA NA only_x
#> 9: 5 north AMOUNT NA 4 NA 500.0 NA NA NA only_y
#> 10: 5 north UNITS NA 4 NA 50.0 NA NA NA only_y
Reading the result:
status is same, changed, only_x (the row is missing from the
tested table) or only_y (the row exists only there).row_id_x and row_id_y are the row numbers in the two inputs.diff is value_y - value_x; abs_diff is its size, and
rel_diff the size relative to the larger of the two values._. That is why id and ID pair up.units was cast to the benchmark's integer type. Its 10.4 was
truncated to 10, which is announced in a message and recorded, with the
rows it touched, in attr(d, "truncated"). Pass truncate = FALSE to refuse such casts
instead.diff_summary() condenses the result per measure:
diff_summary(d)
#> metric n n_same n_changed n_only_x n_only_y max_abs_diff mean_abs_diff rmse max_rel_diff
#> <char> <int> <int> <int> <int> <int> <num> <num> <num> <num>
#> 1: AMOUNT 5 2 1 1 1 0.5 0.1666667 0.2886751 0.002493766
#> 2: UNITS 5 3 0 1 1 0.0 0.0000000 0.0000000 0.000000000
diff_report() draws the whole comparison as text: the columns compared, how
the rows of the two tables align, and how much each measure differs:
여기까지가 README 앞부분입니다. 나머지는 원문에서 읽을 수 있습니다. README 전문 보기 ↗