Skip to contents

Connect and retrieve data

get_connection()
Opens connection to the database
close_connection()
Close connection to the database
id()
Convenience function for DBI::Id
get_tables()
List the available tables on the connection
get_table()
Retrieves a named table from a given schema on the connection
get_catalog() get_schema()
Get the current schema/catalog of a database-related objects
table_exists()
Test if a table exists in database
schema_exists()
Test if a schema exists in given connection

Create or manage tables

create_table()
Create a historical table from input data
create_logs_if_missing()
Create a table with the SCDB log structure if it does not exists
update_snapshot()
Update a historical 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

Manipulate tables

slice_time()
Slices a data object based on time / date
inner_join(<tbl_sql>) left_join(<tbl_sql>) right_join(<tbl_sql>) full_join(<tbl_sql>) semi_join(<tbl_sql>) anti_join(<tbl_sql>)
SQL Joins
unite.tbl_dbi()
tidyr::unite for tbl_dbi
interlace() interlace_sql()
Combine any number of tables, where each has their own time axis of validity

Query table information

is.historical()
Checks if table contains historical data
nrow()
nrow() but also works on remote tables

Developer functions

lock_table() unlock_table()
Sets, queries and removes locks for database tables
db_timestamp()
Determine the type of timestamps the database supports
defer_db_cleanup()
Delete table at function exit
digest_to_checksum()
Computes an checksum from columns
unique_table_name()
Create a name for a temporary table