-
Notifications
You must be signed in to change notification settings - Fork 460
Adding support for InterSystems IRIS dialect #717
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
base: main
Are you sure you want to change the base?
Conversation
Sync from OHDSI/CommonDataModel
The additional unit tests (off by default per the
I can provide values for these to reach our test server through email to the repo admin if needed, though this whole thing is pending a PR for the OHDSI/DatabaseConnector repo. |
OHDSI/DatabaseConnector#302 was just approved and is now part of DatabaseConnector 6.4. Hopefully that means this PR can now also proceed? |
tests/testthat/setup.R
Outdated
server = Sys.getenv("CDMDDLBASE_ORACLE_SERVER"), | ||
pathToDriver = jdbcDriverFolder | ||
), | ||
"iris" = createConnectionDetails( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bdeboe. Can you confirm that there is an OHDSI iris testing environment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I passed the connection details on to @schuemie a month or so ago for inclusion in the DatabaseConnector test suite.
Do you also want to include IRIS in the CDM regression tests? If so, what kind of schema/database setup would you like (I assume something independent of what the DatabaseConnector tests would see). I can set that up and send you the details through email.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have the following secrets set for testing in the OHDSI GitHub organization:
- CDM_IRIS_CDM_SCHEMA
- CDM_IRIS_CONNECTION_STRING
- CDM_IRIS_OHDSI_SCHEMA
- CDM_IRIS_PASSWORD
- CDM_IRIS_USER
I guess we need an empty schema for testing the DDL? Else we could use CDM_IRIS_OHDSI_SCHEMA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Schemas don't need to be created upfront in IRIS, so you can use anything you prefer that wouldn't get in the way of DatabaseConnector's use of the database (which I believe will use the contents of the CDM_IRIS_CDM_SCHEMA env variable / secret). I could also create a separate database (with its own connection string) that'd offer more isolation, but that's probably overkill if we just pick a separate schema name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use CDM_IRIS_CDM_SCHEMA that will conflict with the existing tables in that schema which are used for unit testing by other packages, right?
Are you saying we could create a new schema on the fly just for testing the DDL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is correct.
-- this should just work:
CREATE TABLE MyNewSchemaForMarch12.COHORT ...;
-- and this is probably a good idea at the end
DROP SCHEMA MyNewSchemaForMarch12;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Could you modify the PR to reflect these changes and use the secrets as specified?
Thank you @schuemie and @bdeboe! @katy-sadowski will work on adding this to our testing structure |
@bdeboe @clairblacketer i have the tests working locally. @bdeboe , can you please grant me push access to your fork so i can open a PR? |
@katy-sadowski apologies for the very late response, this got snowed under while I was travelling. Should be done now. |
hi @bdeboe thanks! it'd be best if you refresh, just in case any additional changes need to be made as part of doing that. please let me know when that's complete and i'll push up my changes. |
Hi @katy-sadowski , merging from the main CDM repo went smoothly |
@bdeboe here is my PR to the Intersystems repo: https://github.com/intersystems-community/OHDSI-CommonDataModel/pull/2/files. feel free to merge it in if it looks OK. of note, the postgresql testthat tests are failing locally for me, potentially due to an issue with the secrets i have in my env file. let's see if they work when GH Actions runs them. |
Testthat & GH Actions Updates
all merged now, thanks @katy-sadowski ! @clairblacketer , do you think this is now ready for inclusion in the main CDM repo? |
It looks like the GH Actions tests passed :) I'm not familiar with Codespell but it looks like a spell checker - guessing we can probably ignore that one. |
This Pull Request adds DDL files generated for the new InterSystems IRIS dialect recently added to SqlRender per OHDSI/SqlRender@e5463e2, to address #716