Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Greetings,
I setup my Variable Library ...
Workspace folder location ..
I created a Gen2 Dataflow (CI/CD) enabled to test ...
But I cannot reference the variable in my Dataflow!?!
I've checked and rechecked everything that CoPilot said I should check ... and still nothing, maybe the I in AI was overstated, so I proceeded to removing underscores from the variable names moved Dataflow and Variable Library into the root of the Workspace, still nothing.
Please, anyone with advice on what I'm missing here?
Solved! Go to Solution.
Hello @Ismail_ZA,
What’s happening
In Dataflow Gen2 (CI/CD) the editor doesn’t actually resolve Variable Library values. If you call Variable.Value("$(/**/…)" ) in the editor, you’ll get “variable … could not be found (ErrorCode 10418)” even when the variable exists. Resolution happens at run time.
Do this instead
Use a fallback in authoring
Replace your call with:
– This lets the query evaluate in the editor using the fallback; at refresh/run time the Variable Library value is injected and the fallback is ignored.
Confirm the exact path & names
The syntax must be: $(/**/<Folder>/<LibraryName>/<VariableName>)
Names are exact (spaces/case matter). Avoid trailing spaces or hidden characters.
Try a simpler path (e.g., move the library to the workspace root) and rename to something plain like EnvVars ➜ v_WorkspaceID, then test:
Same workspace + CI/CD enabled
The Variable Library and the Dataflow Gen2 (CI/CD) must be in the same workspace.
Ensure the dataflow is CI/CD-enabled (that SKU/flag enables variable resolution at runtime).
Run with an active value set
If you’re using value sets (DEV/UAT/PROD), make sure the intended set is active when you run (via pipeline or dataflow run settings).
Supported types only
Variables must be one of: Boolean, DateTime, Guid, Integer, Number, String. (Strings are safest for IDs/paths.)
Preview + rollout note
This feature shipped last week at FabCon and is still in Preview. It may not be fully rolled out in every region/capacity yet. If everything above looks right and it still fails at run time (not just in the editor), it could be a rollout gap—try again later or test in a different capacity/region if you have one.
Quick checklist
Use ValueOrDefault(...) during authoring
Verify exact path $(/**/Library/Variable)
Library + Dataflow in the same workspace
Dataflow is CI/CD-enabled
Run with the correct value set
Variable type is supported
Doc : https://learn.microsoft.com/fr-fr/fabric/data-factory/dataflow-gen2-variable-library-integration
Hope it can help you !
Best regards,
Antoine
Mine also does not work, and I copied/pasted the format from the documentation. This is a new feature in preview, it is possible that it just hasn't released yet to all regions?
formula used: Variable.Value("$(/**/VariableLibraryTest/test)")
Hello @Ismail_ZA,
What’s happening
In Dataflow Gen2 (CI/CD) the editor doesn’t actually resolve Variable Library values. If you call Variable.Value("$(/**/…)" ) in the editor, you’ll get “variable … could not be found (ErrorCode 10418)” even when the variable exists. Resolution happens at run time.
Do this instead
Use a fallback in authoring
Replace your call with:
– This lets the query evaluate in the editor using the fallback; at refresh/run time the Variable Library value is injected and the fallback is ignored.
Confirm the exact path & names
The syntax must be: $(/**/<Folder>/<LibraryName>/<VariableName>)
Names are exact (spaces/case matter). Avoid trailing spaces or hidden characters.
Try a simpler path (e.g., move the library to the workspace root) and rename to something plain like EnvVars ➜ v_WorkspaceID, then test:
Same workspace + CI/CD enabled
The Variable Library and the Dataflow Gen2 (CI/CD) must be in the same workspace.
Ensure the dataflow is CI/CD-enabled (that SKU/flag enables variable resolution at runtime).
Run with an active value set
If you’re using value sets (DEV/UAT/PROD), make sure the intended set is active when you run (via pipeline or dataflow run settings).
Supported types only
Variables must be one of: Boolean, DateTime, Guid, Integer, Number, String. (Strings are safest for IDs/paths.)
Preview + rollout note
This feature shipped last week at FabCon and is still in Preview. It may not be fully rolled out in every region/capacity yet. If everything above looks right and it still fails at run time (not just in the editor), it could be a rollout gap—try again later or test in a different capacity/region if you have one.
Quick checklist
Use ValueOrDefault(...) during authoring
Verify exact path $(/**/Library/Variable)
Library + Dataflow in the same workspace
Dataflow is CI/CD-enabled
Run with the correct value set
Variable type is supported
Doc : https://learn.microsoft.com/fr-fr/fabric/data-factory/dataflow-gen2-variable-library-integration
Hope it can help you !
Best regards,
Antoine
Thank you Antoine for the detailed explanation. This solved the problem.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Fabric update to learn about new features.