Package: SCDB 0.4.0.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], Statens Serum Institut [cph, fnd]

SCDB_0.4.0.9000.tar.gz
SCDB_0.4.0.9000.zip(r-4.5)SCDB_0.4.0.9000.zip(r-4.4)SCDB_0.4.0.9000.zip(r-4.3)
SCDB_0.4.0.9000.tgz(r-4.4-any)SCDB_0.4.0.9000.tgz(r-4.3-any)
SCDB_0.4.0.9000.tar.gz(r-4.5-noble)SCDB_0.4.0.9000.tar.gz(r-4.4-noble)
SCDB_0.4.0.9000.tgz(r-4.4-emscripten)SCDB_0.4.0.9000.tgz(r-4.3-emscripten)
SCDB.pdf |SCDB.html
SCDB/json (API)
NEWS

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

Peer review:

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

On CRAN:

27 exports 6 stars 2.77 score 30 dependencies 1 dependents 11 scripts 213 downloads

Last updated 22 hours agofrom:e1c9153728. Checks:OK: 5 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 17 2024
R-4.5-winNOTESep 17 2024
R-4.5-linuxNOTESep 17 2024
R-4.4-winOKSep 17 2024
R-4.4-macOKSep 17 2024
R-4.3-winOKSep 17 2024
R-4.3-macOKSep 17 2024

Exports:close_connectioncreate_indexcreate_logs_if_missingcreate_tabledb_timestampdefer_db_cleanupdigest_to_checksumfilter_keysget_catalogget_connectionget_schemaget_tableget_tablesidinterlaceinterlace_sqlis.historicallock_tableLoggerLoggerNullnrowschema_existsslice_timetable_existsunique_table_nameunlock_tableupdate_snapshot

Dependencies:askpassbackportsblobcheckmateclicpp11DBIdbplyrdplyrfansigenericsgluelifecyclemagrittropensslparallellypillarpkgconfigpurrrR6rlangstringistringrsystibbletidyrtidyselectutf8vctrswithr

SCDB: Basic principles

Rendered fromSCDB.Rmdusingknitr::rmarkdownon Sep 17 2024.

Last update: 2024-03-21
Started: 2024-03-21

SCDB: Benchmarks

Rendered frombenchmarks.Rmdusingknitr::rmarkdownon Sep 17 2024.

Last update: 2024-06-13
Started: 2024-04-15

Slowly Changing Dimension methodology

Rendered fromslowly-changing-dimension.Rmdusingknitr::rmarkdownon Sep 17 2024.

Last update: 2024-02-23
Started: 2023-10-16

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
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 interlace_sql
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