Create a local database on disk using duckdb() and load it with synthetic data ready for analysis.

create_mock_database(file, timezone = Sys.timezone(), silent = FALSE)

Arguments

file

A file path to an existing or new database file with a ".duckdb" extension.

timezone

A string for the time zone in which to return data to R from the database. By default, it is set to Sys.timezone().

silent

if TRUE, the progress bar will be hidden. The default is FALSE.

Value

An object of class duckdb_connection.

Details

This function creates a database on disk at the desired path. The database and its content will persist after it is disconnected.