Thanks for the follow-up question.
You are correct that dbutils.widgets
are not supported in Synapse work environment. Instead, I think you can use the built-in Python input() function to prompt the user to enter the ERP system. Here's an example:
erp_system = input("Enter the ERP system (A or B): ")
Regarding the error you are getting with %run "/path/to/notebook1", it's possible that the path to the notebook is incorrect. Please make sure that you are providing the correct path to the notebook.
To pass parameters to the notebooks in Synapse, you can define variables in the new notebook and pass them as arguments to the notebooks being executed using the %run magic command. Here's an example:
if erp_system == "A":
notebook_path = "/path/to/notebook1" notebook_params = "--param1 value1 --param2 value2"
elif erp_system == "B":
notebook_path = "/path/to/notebook2" notebook_params = "--param1 value1 --param2 value2"
else:
print("Invalid ERP system")
%run $notebook_path $notebook_params
This code defines notebook_path and notebook_params based on the value of erp_system, and then passes them as arguments to the %run magic command.
I hope this helps! Let me know if you have any further questions.