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.
The
getDbDefaultCovariateData()function allows you to directly load the covariate data into a table on the server, which can be quite convenient. However, when usingaggregated = FALSEand not using temporal features, the content of the columns can get switched. For example, thecovariate_idcolumn can contain therow_idvalue 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.