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 |
Connects to the Variable Library endpoint and retrieves variables. Call this within your function before attempting to access variables. |
| parse_variable_definition |
Parse variable library definition data and extract all variables and value sets |
getVariables
parse_variable_definition
Parse variable library definition data and extract all variables and value sets
parse_variable_definition(definition_data, active_value_set_name)
Parameters
| Name | Description |
|---|---|
|
definition_data
Required
|
|
|
active_value_set_name
Required
|
|