Comments (3)
varchar(max) in the original MSSQL dialect SQL gets converted to blob in
oracle and postgresQL. it looks like for redshift, it should use
varchar(max):
http://docs.aws.amazon.com/redshift/latest/dg/r_Character_types.html
a good example where it appears postgres and redshift diverge...
On Wed, Sep 24, 2014 at 4:43 PM, Thomas Nyberg [email protected]
wrote:
This field doesn't seem to be large enough for all cases:
https://github.com/OHDSI/CohortMethod/blob/master/inst/sql/sql_server/CohortMethod.sql#L154
When that gets translated to redshift (at least in my case), the field
becomes varchar(256). But this isn't long enough for some cases at this
line in the CohortMethod.sql code:https://github.com/OHDSI/CohortMethod/blob/master/inst/sql/sql_server/CohortMethod.sql#L681
That field can end up too long if the concept_name field is long. For
example, for concept_id 439181, we have that concept_name is: "Cortex
contusion without open intracranial wound AND with prolonged loss of
consciousness (more than 24 hours) without return to pre-existing conscious
level" which ends up being too long (total length of concatenated string is
274).I have code that replicates this if anyone is curious (I doubt it), but
I'd have to clean it a bit so I'll only do that if someone's interested. I
guess the field size should be increased (though the "max" there is a
little ominous) or maybe the field should just be changed to "text"? I'm
not sure what the best solution is myself since I'm still not too
comfortable with all the inner workings of SqlRender, etc.—
Reply to this email directly or view it on GitHub
#4.
from cohortmethod.
Yeah so when cohort_covariate_ref is created currently (after redshift translation), here is its schema:
CREATE TEMP TABLE cohort_covariate_ref (
covariate_id bigint,
covariate_name VARCHAR,
analysis_id int,
concept_id int)
;
I handcoded it to instead be:
CREATE TEMP TABLE cohort_covariate_ref (
covariate_id bigint,
covariate_name VARCHAR(max),
analysis_id int,
concept_id int)
;
That fixes the problem as one would expect. So if this is fixed in the translation function it should be good to go.
from cohortmethod.
SqlRender now leaves VARCHAR(MAX) as is for Redshift, so this issue should be solved.
from cohortmethod.
Related Issues (20)
- Refactor createStudyPopulation HOT 3
- Add calibrated and uncalibrated oneSidedP to export
- Implement representativeness diagnostic
- Unexpected columns are created using matchOnPsAndCovariates - solution removing hardcoded concepts in mergeCovariatesWithPs HOT 1
- Better implement behavior in fitOutcomeModel() when combining useCovariates with interaction terms HOT 5
- MetaData class proposal HOT 5
- question on equipoise calculation HOT 3
- Error unused argument (outcomeIds = outcomeIds) HOT 2
- `runCmAnalyses(refitPsForEveryOutcome = TRUE)` Error in gzfile(file, "rb"): cannot open the connection HOT 4
- Automatically compute covariate balance in subgroups when specifying interaction terms
- If high correlations are discovered but stopOnError = FALSE, record problem in output data somehow
- Add `unblindForEvidenceSynthesis` column to diagnostics summary table
- Add diagnostics for negative controls
- Feature request: exclude highly correlated covariates from propensity score calculation HOT 3
- "missing value where TRUE/FALSE needed" when fitting outcome models for other outcomes HOT 3
- CohortMethodData is read from env cache even when the covarieSettings have changed within the same R session HOT 3
- Using computeSharedCovariateBalanceArgs causes some non-informative warning messages in the log HOT 1
- Function `drug()` in the demo, does not exist HOT 1
- Add vignette showing results data model
- Error in cohort method in export results from inside strategus HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cohortmethod.