fix(datamart): fixes to correct how we handle activations of new features and legacy queries

This commit is contained in:
2026-04-20 08:49:24 -05:00
parent 32517d0c98
commit b832d7aa1e
2 changed files with 11 additions and 4 deletions

View File

@@ -116,10 +116,17 @@ export const runDatamartQuery = async (data: Data) => {
// for queries that will need to be ran on legacy until we get the plant updated need to go in here // for queries that will need to be ran on legacy until we get the plant updated need to go in here
const doubleQueries = ["inventory"]; const doubleQueries = ["inventory"];
const sqlQuery = sqlQuerySelector( let queryFile = "";
`datamart.${fd.data[0].activated > 0 && doubleQueries.includes(data.name) ? data.name : `legacy.${data.name}`}`,
) as SqlQuery;
if (doubleQueries.includes(data.name)) {
queryFile = `datamart.${
fd.data[0].activated > 0 ? data.name : `legacy.${data.name}`
}`;
} else {
queryFile = `datamart.${data.name}`;
}
const sqlQuery = sqlQuerySelector(queryFile) as SqlQuery;
// checking if warehousing is as it will start to effect a lot of queries for plants that are not on 2. // checking if warehousing is as it will start to effect a lot of queries for plants that are not on 2.
const getDataMartInfo = datamartData.filter((x) => x.endpoint === data.name); const getDataMartInfo = datamartData.filter((x) => x.endpoint === data.name);

View File

@@ -27,7 +27,7 @@ router.get("/", async (_, res) => {
? sqlServerStats?.data[0].UptimeSeconds ? sqlServerStats?.data[0].UptimeSeconds
: [], : [],
eomFGPkgSheetVersion: 1, // this is the excel file version when we have a change to the macro we want to grab this eomFGPkgSheetVersion: 1, // this is the excel file version when we have a change to the macro we want to grab this
masterMacroFile: 1, masterMacroFile: 1.1,
tcpServerOnline: isServerRunning, tcpServerOnline: isServerRunning,
sqlServerConnected: prodSql, sqlServerConnected: prodSql,
gpServerConnected: gpSql, gpServerConnected: gpSql,