-
Notifications
You must be signed in to change notification settings - Fork 176
Add csv for comparison conceptsets #2176
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
Conversation
I tried to compare with the attached concept set CSV and got this error:
Looks like this error isn't a java stack limit, but rather something in PGAdmin. |
Just as an implementation note: I think this is a case where it may make more sense to do this in java-space: by sorting the list and scanning through each result, you can determine which elements are absent/present from each side by scanning through the lists (something not easily done on sql side), but a sql solution could be done using a combinatino of joins (inner join will find 'both', left join will find in C1, and right join could find those in C2. |
@@ -0,0 +1 @@ | |||
select concept_id from @vocabulary_database_schema.CONCEPT where (concept_code, vocabulary_id) in (@conceptColumns) |
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.
From discussion on Atlas WG, this query could be problematic and the root cause of the issue reported in #2176 (comment). This may require refactoring to use a temp table that is created using a UNION ALL
with all of the concepts. Tagging @chrisknoll as he may be able to provide a code pointer to other places in the code base where this is done.
working with tamp table was added
|
||
private String getQuery(final ConceptSetExpression csExpression, final ExpressionType type, | ||
final Source source, final JdbcTemplate jdbcTemplate) { | ||
final ConceptSetExpressionQueryBuilder builder = new ConceptSetExpressionQueryBuilder(); |
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.
Move the instantiation of the builder into 'else' block.
working with tamp table was added
@chrisknoll, The fix is ready - please review. |
Backend for OHDSI/Atlas#2800