@objectstack/service-analytics 10.2.0 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1757,9 +1757,10 @@ var AnalyticsService = class {
|
|
|
1757
1757
|
if (!cube) {
|
|
1758
1758
|
cube = this.inferCubeFromQuery(query);
|
|
1759
1759
|
this.cubeRegistry.register(cube);
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
);
|
|
1760
|
+
const isScalarMetric = (query.dimensions?.length ?? 0) === 0 && (query.timeDimensions?.length ?? 0) === 0;
|
|
1761
|
+
const message = `[Analytics] No cube registered for "${name}"; auto-inferred a minimal cube (sql="${name}", measures=${Object.keys(cube.measures).join(",") || "(none)"}, dimensions=${Object.keys(cube.dimensions).join(",") || "(none)"}). Define an explicit Cube in your stack for full control.`;
|
|
1762
|
+
if (isScalarMetric) this.logger.debug(message);
|
|
1763
|
+
else this.logger.warn(message);
|
|
1763
1764
|
return;
|
|
1764
1765
|
}
|
|
1765
1766
|
const stripPrefix = (m) => m.includes(".") ? m.split(".").slice(1).join(".") : m;
|