We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
CAST(@a AS DATE)
Similar to #370, Snowflake has an issue with casting to date. Here is a reprex:
connectionDetails <- DatabaseConnector::createConnectionDetails( dbms = "snowflake", user = Sys.getenv("CDM_SNOWFLAKE_USER"), password = URLdecode(Sys.getenv("CDM_SNOWFLAKE_PASSWORD")), connectionString = Sys.getenv("CDM_SNOWFLAKE_CONNECTION_STRING") ) cdmDatabaseSchema <- Sys.getenv("CDM_SNOWFLAKE_CDM53_SCHEMA") vocabularyDatabaseSchema <- Sys.getenv("CDM_SNOWFLAKE_CDM53_SCHEMA") cohortDatabaseSchema <- Sys.getenv("CDM_SNOWFLAKE_OHDSI_SCHEMA") options(sqlRenderTempEmulationSchema = Sys.getenv("CDM_SNOWFLAKE_OHDSI_SCHEMA")) sql <- "SELECT CAST('20231231' AS DATE);" translatedSql <- SqlRender::translate( sql = sql, targetDialect = "snowflake" ) connection <- DatabaseConnector::connect(connectionDetails) #> Connecting using Snowflake driver data <- DatabaseConnector::querySql( connection = connection, sql = translatedSql ) print(data) #> CAST('20231231' AS DATE) #> 1 1970-08-23 DatabaseConnector::disconnect(connection)
Created on 2024-08-08 with reprex v2.0.2
The text was updated successfully, but these errors were encountered:
Merge pull request #373 from OHDSI/snowflake-date-cast
5645784
CAST(@A AS DATE) handling for Snowflake - fixes #372
d935545
Successfully merging a pull request may close this issue.
Similar to #370, Snowflake has an issue with casting to date. Here is a reprex:
Created on 2024-08-08 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: