Forum Discussion
Parameters FabricVariablesClient and FabricLakehouseClient in one udf function
I've dug more into this and identified a very weird behaviour. If I use FabricSQLConnection together with the FabricLakehouseClient it works. However If I use the FabricVariablesClient together with any of them, that is not working and throwing exactly the same internal error.
import fabric.functions as fn
udf = fn.UserDataFunctions()
@udf.connection(argName="variables", alias="varlib")
@udf.function()
def this_works(variables: fn.FabricVariablesClient )-> str:
return variables.getVariables()["x"]
@udf.connection(argName="variables", alias="varlib")
@udf.connection(argName="myWarehouse", alias="fabWH")
@udf.function()
def this_fails(variables: fn.FabricVariablesClient, myWarehouse: fn.FabricSqlConnection, )-> str:
return variables.getVariables()["x"]
@udf.connection(argName="variables", alias="varlib")
@udf.connection(argName="myLakehouse", alias="fablakehouse")
@udf.function()
def this_fails_too(variables: fn.FabricVariablesClient, myLakehouse: fn.FabricLakehouseClient, )-> str:
return variables.getVariables()["x"]
Hi OnurOz, it looks like this is unwanted behavior. Are you able to create a support request at Microsoft for this? I can also offer to help do this.
- bruinsmm8 months agoFrequent Visitor
Hi OnurOz and nielsvdc thanks for your help. I will pass the problem to my colleague who can contact with Microsoft.
- v-priyankata8 months agoCommunity Support
Hi bruinsmm
I hope you’ve submitted the support ticket. Once you receive a solution, please share it here so it can help others facing the same issue. If you have any further questions, feel free to reach out to the community.
Thanks.