OHDSI / Legend

An R package implementing Large-Scale Evidence Generation and Evaluation in a Network of Databases (LEGEND).
8 stars 14 forks source link

java.sql.SQLException: [Amazon](500310) Invalid operation: value too long for type character varying(17) #2

Closed siannuzzi closed 6 years ago

siannuzzi commented 6 years ago

Error: java.sql.SQLException: Amazon Invalid operation: value too long for type character varying(17);

SQL: INSERT INTO legend_study.legend_feasability_depression_attition ( exposure_id, target_id, comparator_id, sequence_number, description, subjects) SELECT exposure_id, target_id, comparator_id, sequence_number, description, subjects FROM ( -- Restricted to common period: take final number SELECT epcs.cohort_definition_id AS exposure_id, epcs.target_id, epcs.comparator_id, CAST(4 AS INT) AS sequence_number, CAST('Restricted to common period' AS VARCHAR(255)) AS description, epcs.num_persons AS subjects FROM #ep_cohort_summary epcs
) temp

schuemie commented 6 years ago

Looks like the CREATE TABLE AS SELECT on Amazon didn't create the field types I was expecting. I've switched to explicitly creating the table structure instead.

Can you reinstall the Legend package and try again?