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

Adding support for InterSystems IRIS dialect #717

Open
wants to merge 11 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?

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