How to pass parameter from pipeline to synapse notebook ?

Lotus88 176 Reputation points
2025-05-09T10:31:01.6366667+00:00

Hi,

I have added based parameter on my notebook from pipeline but I am unsure how I can use them in the notebook. May I know is there a way to use it ? Thanks in advance.

User's image

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,339 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Nandan Hegde 35,356 Reputation points MVP Volunteer Moderator
    2025-05-09T11:05:25.6933333+00:00
    0 comments No comments

  2. Smaran Thoomu 23,465 Reputation points Microsoft External Staff Moderator
    2025-05-19T11:26:40.1266667+00:00

    Hi @Lotus88
    Yes, you can definitely pass parameters from an Azure Data Factory (or Synapse pipeline) to a Synapse notebook. Here's how you can use them inside the notebook:

    • In your pipeline, you're already passing a base parameter (as shown in your screenshot).
    • To access this parameter inside the notebook, use the following syntax in your first code cell:
    # Access parameter in Synapse notebook 
    p_sysupdate_dt = mssparkutils.notebook.params.get("p_sysupdate_dt")
    
    • You can now use this variable (p_sysupdate_dt) in your notebook logic — for example, in date filtering or logging.

    Just make sure the parameter name used in the notebook exactly matches the one you set in the pipeline (in this case, p_sysupdate_dt).

    Let us know if you need further help!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.