OHDSI / CohortGenerator

An R package for instantiating cohorts using data in the CDM.
https://ohdsi.github.io/CohortGenerator/
11 stars 10 forks source link

Options to add distribute key while creating cohort table #69

Closed gowthamrao closed 1 year ago

gowthamrao commented 1 year ago

Would it be possible to add

--HINT DISTRIBUTE ON KEY (subject_id)

to the create cohort table DDL

https://github.com/OHDSI/CohortGenerator/blob/2f84a104d24c2abef1bc0df8ed891a050c0d80a3/inst/sql/sql_server/CreateCohortTables.sql#L9-L15

anthonysena commented 1 year ago

This HINT command is necessary since SqlRender will detect the column name of subject_id and include it in the rendered query. See below:

image