Package: SCDB 0.6.2.9000

Rasmus Skytte Randløv

SCDB: Easily Access and Maintain Time-Based Versioned Data (Slowly-Changing-Dimension)

A collection of functions that enable easy access and updating of a database of data over time. More specifically, the package facilitates type-2 history for data-warehouses and provides a number of Quality of life improvements for working on SQL databases with R. For reference see Ralph Kimball and Margy Ross (2013, ISBN 9781118530801).

Authors:Rasmus Skytte Randløv [aut, cre, rev], Marcus Munch Grünewald [aut], Lasse Engbo Christiansen [rev, ctb], Sofia Myrup Otero [rev], Kim Daniel Jacobsen [ctb], Statens Serum Institut [cph, fnd]

SCDB_0.6.2.9000.tar.gz
SCDB_0.6.2.9000.zip(r-4.7)SCDB_0.6.2.9000.zip(r-4.6)SCDB_0.6.2.9000.zip(r-4.5)
SCDB_0.6.2.9000.tgz(r-4.6-any)SCDB_0.6.2.9000.tgz(r-4.5-any)
SCDB_0.6.2.9000.tar.gz(r-4.7-any)SCDB_0.6.2.9000.tar.gz(r-4.6-any)
SCDB_0.6.2.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
SCDB/json (API)

# Install 'SCDB' in R:
install.packages('SCDB', repos = c('https://ssi-dk.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ssi-dk/scdb/issues

Pkgdown/docs site:https://ssi-dk.github.io

On CRAN:

Conda:

7.76 score 8 stars 1 packages 16 scripts 588 downloads 29 exports 31 dependencies

Last updated from:86429a2a1c. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK213
source / vignettesOK274
linux-release-x86_64OK259
macos-release-arm64OK177
macos-oldrel-arm64OK174
windows-develOK194
windows-releaseOK210
windows-oldrelOK204
wasm-releaseOK144

Exports:%>%close_connectioncreate_indexcreate_logs_if_missingcreate_tabledb_timestampdefer_db_cleanupdelta_exportdelta_loaddigest_to_checksumfilter_keysget_catalogget_connectionget_schemaget_tableget_tablesidinterlaceis.historicallock_tableLoggerLoggerNullnrowschema_existsslice_timetable_existsunique_table_nameunlock_tableupdate_snapshot

Dependencies:askpassbackportsblobcheckmateclicpp11DBIdbplyrdplyrgenericsgluelifecyclelubridatemagrittropensslparallellypillarpkgconfigpurrrR6rlangstringistringrsystibbletidyrtidyselecttimechangeutf8vctrswithr

SCDB: Benchmarks

Last update: 2026-05-19
Started: 2024-04-15

Batch migration and incremental backups
Intermittent data migration | Batch data migration

Last update: 2026-01-26
Started: 2026-01-23

Slowly Changing Dimension methodology
Type 1 and Type 2 history | A "timeline of timelines" | Summary | References

Last update: 2025-02-19
Started: 2023-10-16

SCDB: Basic principles
References

Last update: 2025-01-13
Started: 2024-03-21

Readme and manuals

Help Manual

Help pageTopics
Close connection to the databaseclose_connection
Create the indexes on tablecreate_index
Create a table with the SCDB log structure if it does not existscreate_logs_if_missing
Create a historical table from input datacreate_table
Sets, queries and removes locks for database tablesdb_locks lock_table unlock_table
Determine the type of timestamps the database supportsdb_timestamp
Delete table at function exitdefer_db_cleanup
Import and export a data-chunk with history from historical datadelta_export delta_load delta_loading
Computes an checksum from columnsdigest_to_checksum
Filters .data according to all records in the filterfilter_keys
Get the current schema/catalog of a database-related objectsget_catalog get_catalog.Microsoft SQL Server get_schema get_schema.PqConnection get_schema.SQLiteConnection
Opens connection to the databaseget_connection get_connection.default get_connection.duckdb_driver get_connection.OdbcDriver get_connection.PqDriver get_connection.SQLiteDriver
Retrieves a named table from a given schema on the connectionget_table
List the available tables on the connectionget_tables
Convenience function for DBI::Idid id.character id.data.frame id.Id
Combine any number of tables, where each has their own time axis of validityinterlace
Checks if table contains historical datais.historical
SQL Joinsanti_join.tbl_sql full_join.tbl_sql inner_join.tbl_sql joins left_join.tbl_sql right_join.tbl_sql semi_join.tbl_sql
Logger: Complete logging to console, file and databaseLogger
LoggerNull: The no-logging LoggerLoggerNull
nrow() but also works on remote tablesnrow
Test if a schema exists in given connectionschema_exists
Slices a data object based on time / dateslice_time
Test if a table exists in databasetable_exists table_exists.DBIConnection
Create a name for a temporary tableunique_table_name
tidyr::unite for tbl_dbiunite.tbl_dbi
Update a historical tableupdate_snapshot