Skip to content

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

bdeboe
Copy link

@bdeboe bdeboe commented Sep 30, 2024

This Pull Request adds DDL files generated for the new InterSystems IRIS dialect recently added to SqlRender per OHDSI/SqlRender@e5463e2, to address #716

@bdeboe
Copy link
Author

bdeboe commented Oct 23, 2024

The additional unit tests (off by default per the testDatabases <- c("postgresql") in setup.R) rely on the following environment variables:

CDMDDLBASE_IRIS_URL
CDMDDLBASE_IRIS_USER
CDMDDLBASE_IRIS_PASSWORD
CDMDDLBASE_IRIS_CDM_SCHEMA

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.

@bdeboe
Copy link
Author

bdeboe commented Jan 31, 2025

OHDSI/DatabaseConnector#302 was just approved and is now part of DatabaseConnector 6.4. Hopefully that means this PR can now also proceed?

server = Sys.getenv("CDMDDLBASE_ORACLE_SERVER"),
pathToDriver = jdbcDriverFolder
),
"iris" = createConnectionDetails(
Copy link
Contributor

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?

Copy link
Author

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.

Copy link
Member

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

Copy link
Author

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.

Copy link
Member

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?

Copy link
Author

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;

Copy link
Member

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?

@clairblacketer
Copy link
Contributor

Thank you @schuemie and @bdeboe! @katy-sadowski will work on adding this to our testing structure

@katy-sadowski
Copy link
Collaborator

@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?

@bdeboe
Copy link
Author

bdeboe commented Apr 14, 2025

@katy-sadowski apologies for the very late response, this got snowed under while I was travelling. Should be done now.
LMK if you want me to refresh our fork first or would take care of that as part of your push?

@katy-sadowski
Copy link
Collaborator

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.

@bdeboe
Copy link
Author

bdeboe commented Apr 15, 2025

Hi @katy-sadowski , merging from the main CDM repo went smoothly

@katy-sadowski
Copy link
Collaborator

@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.

Katy Sadowski and others added 2 commits April 15, 2025 19:58
@bdeboe
Copy link
Author

bdeboe commented Apr 16, 2025

all merged now, thanks @katy-sadowski !

@clairblacketer , do you think this is now ready for inclusion in the main CDM repo?

@katy-sadowski
Copy link
Collaborator

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.

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.

4 participants