Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running IncidencePrevalence with Databricks #6

Open
laacdm opened this issue Apr 17, 2024 · 1 comment
Open

Error when running IncidencePrevalence with Databricks #6

laacdm opened this issue Apr 17, 2024 · 1 comment

Comments

@laacdm
Copy link

laacdm commented Apr 17, 2024

Describe the bug
Error:
java.sql.SQLException: [Databricks]DatabricksJDBCDriver ERROR processing query/statement. Error Code: 0, SQL state: org.apache.hive.service.cli.HiveSQLException: Error running query: [UNRESOLVED_ROUTINE] org.apache.spark.sql.AnalysisException: [UNRESOLVED_ROUTINE] Cannot resolve function add_days on search path [system.builtin, system.session, spark_catalog.pwb_atlas_temp].;

To Reproduce
Steps to reproduce the behavior:

  1. con <- DatabaseConnector::connect(connectionDetails)
  2. cdm <- CDMConnector::cdm_from_con(con,cdm_schema = "xxxx",write_schema = c(schema = "xxxx", prefix = "xxxx"))
  3. cdmPre <- IncidencePrevalence::generateDenominatorCohortSet(cdm = cdm,
    name = "denominator",
    cohortDateRange = c(as.Date("2008-01-01"), as.Date("2012-01-01")),
    ageGroup = list(c(0, 150)),
    sex = "Both",
    daysPriorObservation = 0
    )
    Expected behavior
    A table with the denominator cohort.

Screenshots
results23

Desktop (please complete the following information):
Platform:

  • OS: x86_64-pc-linux-gnu
  • R version: 4.2.3 (2023-03-15)
  • Browser Chrome
  • Version 120
@ablack3
Copy link
Collaborator

ablack3 commented Sep 6, 2024

@laacdm try using the databricks odbc driver as described here https://solutions.posit.co/connections/db/databases/databricks/#driver-options.

Eventually we will get DatabaseConnector jdbc drivers working but it will require new releases of DatabaseConnector and CDMConnector.

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

No branches or pull requests

2 participants