From e1930bf08ab4e915b9e09d4d64a98a569a37877c Mon Sep 17 00:00:00 2001 From: Jaren Brownlee Date: Mon, 20 Feb 2023 11:28:10 -0700 Subject: [PATCH] fix select statement on imports --- .../repositories/data_warehouse/import/import_repository.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/data_access_layer/repositories/data_warehouse/import/import_repository.ts b/src/data_access_layer/repositories/data_warehouse/import/import_repository.ts index d3f6950e9..f7826a96e 100644 --- a/src/data_access_layer/repositories/data_warehouse/import/import_repository.ts +++ b/src/data_access_layer/repositories/data_warehouse/import/import_repository.ts @@ -69,8 +69,7 @@ export default class ImportRepository extends Repository implements RepositoryIn super(ImportMapper.tableName); // in order to select the composite fields we must redo the initial query - this._query.SELECT = [ - `SELECT ${this._tableAlias}.*, + this._query.SELECT = [`${this._tableAlias}.*, SUM(CASE WHEN (data_staging.errors IS NOT NULL AND data_staging.errors != '{}') AND data_staging.import_id = ${this._tableAlias}.id