Skip to content

Colums can switch when directly inserting covariates into a table #326

Description

@schuemie

The getDbDefaultCovariateData() function allows you to directly load the covariate data into a table on the server, which can be quite convenient. However, when using aggregated = FALSE and not using temporal features, the content of the columns can get switched. For example, the covariate_id column can contain the row_id value and the other way around.

The root cause seems to be here, where we use SELECT * to get the data, which does not imply a column order, while here the columns are expected to be in specific order.

I think changing the SELECT * to explicitly select the columns should fix the problem.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions