Learn R Programming

⚠️There's a newer version (0.5.1) of this package.Take me there.

SCDB

Overview

SCDB is a package for easily maintaining and updating data with a slowly changing dimension. More specifically, the package facilitates type-2 history for data warehouses and provide a number of quality-of-life improvements for working with SQL databases within R.

To better understand what a slowly changing dimension is and how and this packages provides it, see vignette("slowly-changing-dimension").

Installation

# Install SCDB from CRAN:
install.packages("SCDB")

# Alternatively, install the development version from github:
# install.packages("devtools")
devtools::install_github("ssi-dk/SCDB")

Usage

For basic usage examples, see vignette("SCDB").

Copy Link

Version

Install

install.packages('SCDB')

Monthly Downloads

190

Version

0.4.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Rasmus Skytte Randløv

Last Published

October 3rd, 2024

Functions in SCDB (0.4.1)

create_logs_if_missing

Create a table with the SCDB log structure if it does not exists
joins

SQL Joins
nrow

nrow() but also works on remote tables
create_table

Create a historical table from input data
schema_exists

Test if a schema exists in given connection
SCDB-package

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

Close connection to the database
interlace

Combine any number of tables, where each has their own time axis of validity
is.historical

Checks if table contains historical data
get_catalog

Get the current schema/catalog of a database-related objects
slice_time

Slices a data object based on time / date
get_table

Retrieves a named table from a given schema on the connection
table_exists

Test if a table exists in database
db_locks

Sets, queries and removes locks for database tables
db_timestamp

Determine the type of timestamps the database supports
get_tables

List the available tables on the connection
id

Convenience function for DBI::Id
defer_db_cleanup

Delete table at function exit
unique_table_name

Create a name for a temporary table
filter_keys

Filters .data according to all records in the filter
Logger

Logger: Complete logging to console, file and database
LoggerNull

LoggerNull: The no-logging Logger
digest_to_checksum

Computes an checksum from columns
unite.tbl_dbi

tidyr::unite for tbl_dbi
update_snapshot

Update a historical table
get_connection

Opens connection to the database