fix(datamart): fixes to correct how we handle activations of new features and legacy queries
This commit is contained in:
@@ -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
|
||||
const doubleQueries = ["inventory"];
|
||||
const sqlQuery = sqlQuerySelector(
|
||||
`datamart.${fd.data[0].activated > 0 && doubleQueries.includes(data.name) ? data.name : `legacy.${data.name}`}`,
|
||||
) as SqlQuery;
|
||||
let queryFile = "";
|
||||
|
||||
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.
|
||||
|
||||
const getDataMartInfo = datamartData.filter((x) => x.endpoint === data.name);
|
||||
|
||||
@@ -27,7 +27,7 @@ router.get("/", async (_, res) => {
|
||||
? 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
|
||||
masterMacroFile: 1,
|
||||
masterMacroFile: 1.1,
|
||||
tcpServerOnline: isServerRunning,
|
||||
sqlServerConnected: prodSql,
|
||||
gpServerConnected: gpSql,
|
||||
|
||||
Reference in New Issue
Block a user