Skip to content

Commit

Permalink
move other
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Feb 12, 2025
1 parent e6ba45c commit 6808caf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Rdmp.Core/Curation/Data/Catalogue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ public enum DataSourceTypes
}
public enum DataSourceSettingTypes
{
Other,
CohortStudyTrial,
Clinic,
PrimaryCareReferrals,
Expand All @@ -912,8 +913,7 @@ public enum DataSourceSettingTypes
Private,
SocialCareHealthcareAtHome,
SocialCareOthersocialData,
Census,
Other
Census
}
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ private void CreateCohortTempTable(DbConnection con, IDataLoadEventListener list
""";
break;
case DatabaseType.Oracle:
sql= $"""
sql = $"""
CREATE TEMPORARY TABLE {_uuid} SELECT * FROM {_externalCohortTable.TableName} WHERE {_whereSQL}
""";
break;
case DatabaseType.PostgreSql:
sql= $"""
sql = $"""
CREATE TEMP TABLE {_uuid} AS
SELECT * FROM {_externalCohortTable.TableName} WHERE {_whereSQL}
""";
Expand All @@ -222,8 +222,9 @@ CREATE TEMP TABLE {_uuid} AS
{
cmd.ExecuteNonQuery();
}
catch (Exception ex) {
listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning, $"Unable to create temporary table for cohort. Original cohort table will be used",ex));
catch (Exception ex)
{
listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning, $"Unable to create temporary table for cohort. Original cohort table will be used", ex));
_uuid = null;
}
listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Information, $"Cohort successfully copied to temporary table"));
Expand Down Expand Up @@ -275,7 +276,12 @@ public virtual DataTable GetChunk(IDataLoadEventListener listener, GracefulCance
_hostedSource = UseTempTablesWhenExtractingCohort ? new DbDataCommandDataFlowSource(cmdSql,
$"ExecuteDatasetExtraction {Request.DatasetBundle.DataSet}",
_con,
ExecutionTimeout) : new DbDataCommandDataFlowSource(cmdSql,
ExecutionTimeout)
{
AllowEmptyResultSets = AllowEmptyExtractions || Request.IsBatchResume,
BatchSize = BatchSize
}
: new DbDataCommandDataFlowSource(cmdSql,
$"ExecuteDatasetExtraction {Request.DatasetBundle.DataSet}",
Request.GetDistinctLiveDatabaseServer().Builder,
ExecutionTimeout)
Expand Down

0 comments on commit 6808caf

Please sign in to comment.