| create_contoso_duckdb | R Documentation |
Creates a DuckDB connection with Contoso datasets loaded from cloud storage. The datasets are stored as Parquet files on Backblaze B2 and streamed directly into DuckDB.
create_contoso_duckdb(size = "small")
size |
Dataset size: "small", "medium", "large", or "mega" |
The create_contoso_duckdb() function creates views for the following Contoso datasets:
sales: Contains sales transaction data.
product: Contains details about products, including attributes like product name, manufacturer, and category.
customer: Contains customer demographic and geographic information.
store: Contains information about store locations and attributes.
fx: Contains foreign exchange rate data for currency conversion.
calendar: Contains various date-related information, including day, week, month, and year.
orders: Contains order header information.
orderrows: Contains order line items.
Available sizes (approximate sales rows):
small: ~8,000 rows
medium: ~2.3 million rows
large: ~47 million rows
mega: ~237 million rows
A list containing:
sales, product, customer, store, fx, calendar, orders, orderrows: lazy tbl objects
con: the DuckDB connection (use DBI::dbDisconnect(db$con, shutdown = TRUE) when done)
## Not run:
db <- create_contoso_duckdb(size = "small")
db$sales |> head()
DBI::dbDisconnect(db$con, shutdown = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.