Skip to content

Conversation

@ablack3
Copy link
Collaborator

@ablack3 ablack3 commented Dec 30, 2025

Using this branch the issue with duckdb dplyr sql translation seems fixed. #324

connectionDetails <- Eunomia::getEunomiaConnectionDetails(dbms = "duckdb")


connection <- DatabaseConnector::connect(connectionDetails)
#> Connecting using DuckDB driver


visit <- dplyr::tbl(connection, "visit_occurrence")

visit |> 
  dplyr::transmute(visit_start_date, new_date = clock::add_years(visit_start_date, 1L))
#> # Source:   SQL [?? x 2]
#> # Database: DatabaseConnectorDbiConnection
#>    visit_start_date new_date           
#>    <date>           <dttm>             
#>  1 1996-08-21       1997-08-21 00:00:00
#>  2 1988-03-28       1989-03-28 00:00:00
#>  3 2012-05-14       2013-05-14 00:00:00
#>  4 2003-09-14       2004-09-14 00:00:00
#>  5 1976-03-04       1977-03-04 00:00:00
#>  6 1999-02-14       2000-02-14 00:00:00
#>  7 1998-09-14       1999-09-14 00:00:00
#>  8 1980-07-22       1981-07-22 00:00:00
#>  9 2003-09-12       2004-09-12 00:00:00
#> 10 2008-04-27       2009-04-27 00:00:00
#> # ℹ more rows

DatabaseConnector::disconnect(connection)

Created on 2025-12-30 with reprex v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants