Skip to content

Commit eac8b9e

Browse files
committed
fixed contoso duckdb error
1 parent 843de1b commit eac8b9e

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

R/database.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#' - `customer`: Contains customer demographic and geographic information.
1414
#' - `store`: Contains information about store locations and attributes.
1515
#' - `fx`: Contains foreign exchange rate data for currency conversion.
16-
#' - `date`: Contains various date-related information, including day, week, month, and year.
16+
#' - `calendar`: Contains various date-related information, including day, week, month, and year.
1717
#' - `con`: the duckdb connection to your database
1818
#'
1919
#' You can choose to store the database in memory or in a temporary directory. If you choose "temp", the database will be created in a temporary file on disk. If you choose "in_memory", the database will be created entirely in memory and will be discarded after the R session ends.
@@ -27,7 +27,7 @@
2727
#' - `fx`
2828
#' - `store`
2929
#' - `orderrows`
30-
#' - `date`
30+
#' - `calendar`
3131
#'
3232
#' @examples
3333
#' # Create a DuckDB version of Contoso datasets stored in memory
@@ -59,7 +59,7 @@ suppressWarnings(DBI::dbExecute(con,"INSTALL motherduck;"))
5959

6060
suppressWarnings(DBI::dbExecute(con,"ATTACH 'md:_share/contoso/5cd50a2d-d482-4160-b260-f10091290db9' as contoso"))
6161

62-
tables_vec <- c("sales","product","customer","store","orders","orderrows","fx","date")
62+
tables_vec <- c("sales","product","customer","store","orders","orderrows","fx","calendar")
6363

6464
schema_options_vec <- c("100k"="small","1m"="medium","10m"="large","100m"="mega")
6565

@@ -80,7 +80,7 @@ store_db <- dplyr::tbl(con,sql_vec[[4]])
8080
orders_db <- dplyr::tbl(con,sql_vec[[5]])
8181
orderrows_db <- dplyr::tbl(con,sql_vec[[6]])
8282
fx_db <- dplyr::tbl(con,sql_vec[[7]])
83-
date_db <- dplyr::tbl(con,sql_vec[[8]])
83+
calendar_db <- dplyr::tbl(con,sql_vec[[8]])
8484

8585

8686
out <- list(
@@ -89,7 +89,7 @@ out <- list(
8989
,customer=customer_db
9090
,store=store_db
9191
,fx=fx_db
92-
,date=date_db
92+
,calendar=calendar_db
9393
,orders=orders_db
9494
,orderrows=orderrows_db
9595
,con=con

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<!-- badges: start --> [![CRAN
44
status](https://www.r-pkg.org/badges/version/contoso?svg=1.png)](https://CRAN.R-project.org/package=contoso)
55
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/usrbinr/contoso/HEAD)
6+
[![](https://cranlogs.r-pkg.org/badges/contoso.png)](https://cran.r-project.org/package=contoso)
67
<!-- badges: end -->
78

89
![](man/figures/logo.png)

README.qmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ format: gfm
55
<!-- badges: start -->
66
[![CRAN status](https://www.r-pkg.org/badges/version/contoso?svg=1)](https://CRAN.R-project.org/package=contoso)
77
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/usrbinr/contoso/HEAD)
8+
[![](https://cranlogs.r-pkg.org/badges/contoso)](https://cran.r-project.org/package=contoso)
89
<!-- badges: end -->
910

1011

man/create_contoso_duckdb.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)