@Soyab - Thanks for the question and using MS Q&A platform.
You can simply parameterize
linked_service_name
varaibale as the toggle parameter cell to pass the parameters to that LinkedService from PySpark Notebook
To parameterize your notebook, select the ellipses (...) to access the more commands at the cell toolbar. Then select Toggle parameter cell to designate the cell as the parameters cell.
Azure Data Factory/Synapse looks for the parameters cell and uses the values as defaults for the parameters passed in at execution time. The execution engine will add a new cell beneath the parameters cell with input parameters to overwrite the default values.
For more details, refer to Transform data by running a Synapse notebook - Passing parameters.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.