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

@schuemie
Copy link
Member

schuemie commented Jan 5, 2026

Thanks @ablack3 ! Would you mind adding some comments to the code to explain why this is necessary? Else I think a year from now we'll all be scratching our heads when we see it ;-)

@ablack3
Copy link
Collaborator Author

ablack3 commented Jan 7, 2026

Hi @schuemie yes good idea.

I've added a few comments. It looks like the tests fail because the iris test database is not reachable.

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 56.36%. Comparing base (0d00a30) to head (d776553).
⚠️ Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
R/backend-DatabaseConnector.R 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #325      +/-   ##
===========================================
+ Coverage    56.33%   56.36%   +0.02%     
===========================================
  Files           16       16              
  Lines         2721     2725       +4     
===========================================
+ Hits          1533     1536       +3     
- Misses        1188     1189       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@schuemie schuemie merged commit 370e9b4 into develop Jan 8, 2026
9 of 10 checks passed
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.

3 participants