Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A variable library item in Microsoft Fabric contains a list of variables and their default values. It can also contain other value sets that hold alternative values.
Each variable in the variable library has the following properties:
- Name
- Note (optional), up to 2,048 characters
- Type
- Default value set
- Alternative value sets (optional)
Note
The Fabric variable library item is currently in preview.
Naming conventions
Variable library name
The name of variable library item itself must follow these conventions:
- Isn't empty
- Doesn't have leading or trailing spaces
- Starts with a letter
- Can include letters, numbers, underscores, hyphens, and spaces
- Doesn't exceed 256 characters in length
The variable library name is not case sensitive.
Variable name
The name of a variable inside the variable library must follow these conventions:
- Isn't empty
- Doesn't have leading or trailing spaces
- Starts with a letter or an underscore
- Can include letters, numbers, underscores, and hyphens
- Doesn't exceed 256 characters in length
The variable name is not case sensitive.
Value set name
Value set names have the same restrictions as variable names.
Variable types
Before you can add a value to a variable, you must define the variable type. The variables in the variable library can be any of the following types:
String: Any character. Can be
null
or empty.Boolean:
True
orFalse
.DateTime: Date and time represented as the ISO 8601 standard yyyy-MM-ddTHH:mm:ss.xxxZ, where:
- yyyy-MM-dd is the four-digit year, followed by the two-digit month and two-digit day.
- T separates the date and the time.
- HH:mm:ss.xxx is the two-digit hour in 24-hour format, followed by the two-digit minute, two-digit second, and three-digit millisecond.
- Z indicates that the time is in Coordinated Universal Time (UTC).
An example is
2025-01-14T16:15:20.123Z
.Number: Any number.
GUID: A globally unique identifier.
Integer: A whole number that can be positive, negative, or zero.
After a variable has a defined value, if you try to change its type, a consent dialog appears. The dialog alerts you that all the variable values will be reset and that this change could be a breaking change on the consumer item side.
Alternative value sets
When you create a new value set in a variable library, the new values are set as pointers to the default values. You can change them to be a fixed value.
If you change the value of a variable in the alternative value set, the alternative value is saved in the JSON file for value sets. You can change the order in which the value sets appear, or change the value of a variable in the alternative value set, in this JSON file in Git.
Considerations and limitations
Size limitations
There can be up to 1,000 variables and up to 1,000 value sets, as long as you meet both of these requirements:
- The total number of cells in the alternative value sets is less than 10,000.
- The item's size doesn't exceed 1 MB.
These requirements are validated when you save changes.
The note field can have up to 2,048 characters.
The value-set description field can have up to 2,048 characters.
Limitations for alternative value sets
- Alternative value sets in a variable library appear in the order in which you added them. Currently, you can't reorder them in the UI. To change the order, edit the JSON file directly.
- The name of each value set must be unique within a variable library.
- Variable names must be unique within a variable library. You can have two variables with the same name in a workspace if they're in different items.
- There's always one (and only one) active value set in a variable library at a time. You can't delete a value set while it's active. To delete it, first configure another value set to be active. You can have a different active value set for each stage of a deployment pipeline.