Achilles
Achilles copied to clipboard
Error in exportToAres() with duckdb output format
When I run exportToAres() with outputFormat="duckdb"
, I see following error:
arguments imply differing number of rows: 1, 0
Here is log:
...
Connecting using Redshift driver
Generating Measurement reports
Generating Measurement reports
Connecting using Redshift driver
Error in data.frame(CONCEPT_ID = concept_id, CONCEPT_NAME = report$CONCEPT_NAME, :
arguments imply differing number of rows: 1, 0
This happens when concept_id is 0 and some other fields, like concept_name, are NAs. normalizeEmptyValue()
replaces NAs with empty vectors and subsequent call to createConceptMedatataTable()
tries to create data.frame out of concept_id of length 1 and the empty vectors.
Not sure if having concept_id 0 with empty concept_name is a valid situation. When running with JSON output format against the same data, no error is produced.
Pushed fix to https://github.com/OHDSI/Achilles/pull/742