Trending

World technology news

→
Keeping test and production sources separate with Direct Lake M parameters
Business Intelligence · 2026
Business Intelligence

Keeping test and production sources separate with Direct Lake M parameters

Use the November 2026 preview to verify that a Direct Lake on OneLake semantic model connects to the right lakehouse before and after deployment.

Developer's JournalPublished: Dec 5, 20266 min read
Reading progress0%
In this article
  1. What Microsoft announced in November 2026
  2. Write down what each stage should read
  3. Parameterize the shared connection expression
  4. Apply the rule in the target pipeline stage
  5. Verify data, access and a recovery path
  6. Distinguish environments with a known record
  7. Keep the target rule and its deployment result together

What Microsoft announced in November 2026

Microsoft’s November 17, 2026 Power BI feature summary introduced M parameter support for Direct Lake on OneLake models as a preview. The announcement put the Power BI Desktop release in the week of November 23. Microsoft Learn’s Develop Direct Lake semantic models article explains the connection pattern. Its Create deployment rules for Fabric’s ALM article documents how to set target-stage values. Check the supported editing interface and the version available in your workspace before using the feature. The status recorded here is the preview status announced in November.

Write down what each stage should read

Consider a logistics team with development, test and production workspaces. Each lakehouse exposes a Shipment table and a Calendar table with the same names. Development contains synthetic records, test contains an approved test dataset, and production holds actual deliveries. Record the workspace ID, the lakehouse item ID and the expected tables for each stage. Add a DEV or TEST marker to the validation dataset and use a small separate validation table in production. Then a model query can tell you which source supplied the rows even when all three versions of the report look similar.

Machine learning pipelineConceptual sketch · summary of the article's technical flow

Parameterize the shared connection expression

Microsoft Learn demonstrates text parameters for the workspace and lakehouse IDs. A model with one connection can instead use a text parameter named OneLakeSourceUrl for the entire URL. Open the shared connection expression in TMDL view and preserve its existing name and any additional options while replacing the hard-coded location. Use the ID of the lakehouse item itself and the workspace it belongs to. The SQL analytics endpoint has a separate ID. For models that read several lakehouses, consider sharing a workspace parameter across those connections and keeping a separate item parameter for each source.

OneLakeSourceUrl: Text
https://onelake.dfs.fabric.microsoft.com/<workspace-id>/<lakehouse-id>

AzureStorage.DataLake(OneLakeSourceUrl, [HierarchicalNavigation = true])

Apply the rule in the target pipeline stage

Deploy once to create the semantic model in the target stage, then find that item in the deployment pipeline. Under Parameter rules, set the appropriate source value for the test or production stage and deploy again to apply it. Microsoft Learn specifies text parameters for this Direct Lake on OneLake scenario and requires the item owner to create the rule. When the pipeline shows the intended parameter value, check the connected location and query the validation marker separately. These checks catch a stage configuration that looks correct in the pipeline but has yet to be applied to the deployed model.

Verify data, access and a recovery path

Query a fixed set of deliveries in test and record the table count, sample row count and stage marker. Open the same report as a developer and as a user with limited test access to check what each identity can read. The source parameter and authorization are separate settings. In an isolated test stage, try an incorrect item ID and confirm that the team can detect a rejected deployment or a faulty connection before promotion. Keep the previously verified model version and its source parameter together so that a recovery restores the right combination. Record the model identifier and target stage with the results so the checks can be tied to the right deployment.

Distinguish environments with a known record

My Node.js fixture maps development to dev-17, test to test-22 and production to prod-63. Test and production each contain three rows, so their counts match even when the connection is wrong. The biggest sequence number is 14 in test and 28 in production. The fixture rejected a test workspace identifier passed to the production stage before opening its sample table. The executable example models the acceptance check with fictional objects and makes no Fabric calls. In the semantic model, verify the target against the approved workspace and item identifiers, then read a known non-sensitive record. An exact total may be unstable in a continuously updating table. A documented sample row is often easier for another operator to verify.

import assert from 'node:assert/strict';

const rules = {Development: 'dev-17', Test: 'test-22', Production: 'prod-63'};
const rows = {'test-22': [4, 9, 14], 'prod-63': [11, 19, 28]};
function deploy(target, value) {
  if (rules[target] !== value) throw Error('WORKSPACE_MISMATCH');
  if (!Object.hasOwn(rows, value)) throw Error('PROBE_MISSING');
  return {cleanRows: rows[value].length, maxSequence: Math.max(...rows[value])};
}
const test = deploy('Test', 'test-22');
assert.throws(() => deploy('Production', 'test-22'), /WORKSPACE_MISMATCH/);
const production = deploy('Production', 'prod-63');
assert.deepEqual(test, {cleanRows:3, maxSequence:14});
assert.deepEqual(production, {cleanRows:3, maxSequence:28});
console.log(JSON.stringify({test, rejectedWrongWorkspace: true, production}));

Keep the target rule and its deployment result together

Fabric deployment rules attach to the target item. Record which rule applied, when it was deployed and which workspace the subsequent query reached. Recheck in a separate account with the intended report access, because a successful check made by a model owner does not establish another user’s permissions. Microsoft listed M parameters for Direct Lake on OneLake as a November preview. Verify the model and connector mode before relying on that feature. Keep the last working parameter and the model version available for a rollback. After restoring a rule, redeploy and repeat both the connection and data checks before releasing the report to readers.

145 reads ✎ Write a comment

Reader discussion

Discussion prompt

Which data would you verify before applying this development in your field?

No comments yet. Be the first to contribute.

Write a comment

Comments are real visitor contributions. Repeated, link-heavy or abusive submissions may be limited.