FabricVariablesClient Class
This class is used to connect to Fabric Variable Library resources.
A User Data Function with a parameter of this type must be decorated with connection (see the example under Remarks).
Don't worry about using the constructor to create an instance of this class. Fabric will automatically create it for you (as long as you follow the steps within Remarks).
Constructor
FabricVariablesClient(alias_name: str, endpoints: Dict[str, Dict[str, str]])
Parameters
| Name | Description |
|---|---|
|
alias_name
Required
|
The alias for the data source being connected to, configured in the portal. |
|
endpoints
Required
|
The different endpoints for the data source. |
Remarks
To use this class and have Fabric make the proper connections to your Variable Library, you must:
- Add a data connection in the Connections tab of your User Data Functions on the portal.
- Add a parameter to your User Data Function with the type 'FabricVariablesClient'.
- Add the decorator connection to your User Data Function that references the parameter and the alias of the data connection you made.
Methods
| getVariables |
Retrieves all variables from the connected Variable Library with their effective values. Uses the DiscoverVariablesV2 API, which returns resolved values with active value set overrides already applied server-side. |
getVariables
Retrieves all variables from the connected Variable Library with their effective values.
Uses the DiscoverVariablesV2 API, which returns resolved values with active value set overrides already applied server-side.
getVariables() -> Dict[str, str]
Returns
| Type | Description |
|---|---|
|
A dictionary mapping variable names to their values. |