@microsoft/rayfin-semantic-model-pack 2.0.0 → 2.1.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/CHANGELOG
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to `@microsoft/rayfin-semantic-model-pack` will be documente
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 2.1.0 - 2026-11-17
|
|
9
|
+
|
|
10
|
+
- [Template] Bump to rayfin 2.0.0
|
|
11
|
+
- Add new selectColumns helper to parse out unused measures from highlight helpers
|
|
12
|
+
|
|
8
13
|
## 2.0.0 - 2026-11-11
|
|
9
14
|
|
|
10
15
|
- [Rayfin Packs] Unify Lyra skills in shared rayfin pack npm packages
|
package/pack.json
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
"@microsoft/rayfin-connectors": "match:@microsoft/rayfin-core",
|
|
7
7
|
"@microsoft/rayfin-connector-fabric-semanticmodel": "match:@microsoft/rayfin-core",
|
|
8
8
|
"@microsoft/rayfin-lib": "match:@microsoft/rayfin-core",
|
|
9
|
-
"@microsoft/fabric-visuals-core": "5.
|
|
10
|
-
"@microsoft/fabric-interaction-manager": "1.
|
|
9
|
+
"@microsoft/fabric-visuals-core": "5.4.0",
|
|
10
|
+
"@microsoft/fabric-interaction-manager": "1.3.0"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"schema:sql": "fabric-app-semantic-model-tools query-schema",
|
|
14
14
|
"schema:refresh": "fabric-app-semantic-model-tools query-schema --refresh"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@microsoft/fabric-app-semantic-model-tools": "1.
|
|
17
|
+
"@microsoft/fabric-app-semantic-model-tools": "1.3.0"
|
|
18
18
|
},
|
|
19
19
|
"gitignore": [
|
|
20
20
|
".schema/",
|
package/package.json
CHANGED
|
@@ -28,9 +28,10 @@ When writing the alignment:
|
|
|
28
28
|
identifiers. Alignment uses raw key values; never substitute localized display
|
|
29
29
|
labels. A series field requires alignment by both category and series.
|
|
30
30
|
- Alignment throws on duplicate tuples and on subset tuples outside the baseline.
|
|
31
|
-
- In `missingMeasureReplacementValues`,
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
- In `missingMeasureReplacementValues`, include every measure returned by the
|
|
32
|
+
query, including tooltip-only measures. Any omitted column must stay unchanged
|
|
33
|
+
between baseline and highlight results. Use `0` when a missing group means zero,
|
|
34
|
+
as for sums and counts, or `null` to keep BLANK, as for ratios.
|
|
34
35
|
- List the measures the chart draws in `plottedMeasureFields`.
|
|
35
36
|
|
|
36
37
|
For Top N, do not rerun the ranking under highlight filters; see
|
|
@@ -123,6 +123,34 @@ The target loads on mount and reloads when its factory inputs or interactions
|
|
|
123
123
|
affecting it change. Keep the factory function stable unless changing it is
|
|
124
124
|
intended to reload the target.
|
|
125
125
|
|
|
126
|
+
### Shared cached queries
|
|
127
|
+
|
|
128
|
+
Skip `selectColumns` when the query already returns only the columns the visual
|
|
129
|
+
needs, including tooltip fields. For a broader shared cached query, trim each
|
|
130
|
+
target's result in a custom loader registered with `useManagedInteractionTarget`.
|
|
131
|
+
|
|
132
|
+
Select after `executeQueryFactory`, before alignment, using the same columns
|
|
133
|
+
for baseline, highlight, and non-highlight loads.
|
|
134
|
+
|
|
135
|
+
For a shared query returning `Geography`, `Harvest`, and `HunterDays`, where the
|
|
136
|
+
visual uses only `Geography` and `Harvest`:
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
import { selectColumns } from "@microsoft/fabric-visuals-core";
|
|
140
|
+
import type { DataTable } from "@microsoft/fabric-visuals-core";
|
|
141
|
+
import { executeQueryFactory } from "@/lib/query-factory";
|
|
142
|
+
import { geographyHarvest } from "@/queries";
|
|
143
|
+
|
|
144
|
+
async function loadRankingTable(
|
|
145
|
+
interactionFilters: readonly string[],
|
|
146
|
+
): Promise<DataTable> {
|
|
147
|
+
const queryResult: DataTable = await executeQueryFactory(
|
|
148
|
+
geographyHarvest({ interactionFilters }),
|
|
149
|
+
);
|
|
150
|
+
return selectColumns(queryResult, ["Geography", "Harvest"]);
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
126
154
|
### Query execution and load states
|
|
127
155
|
|
|
128
156
|
The hook uses `useManagedInteractionTarget` to manage loading and retain
|