<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Set NotebookId dynamically in notebook activity of data pipeline irrespective of Fabric workspace in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4301327#M6478</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="860922" data-lia-user-login="KhagendraWagle" class="lia-mention lia-mention-user"&gt;KhagendraWagle&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much for sharing this, it's very informative for anyone who has encountered similar issues before.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Adamk Kong&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2024 06:06:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-26T06:06:41Z</dc:date>
    <item>
      <title>Set NotebookId dynamically in notebook activity of data pipeline irrespective of Fabric workspace</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4299424#M6470</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I believe most of you have come to the situation where a notebook needs to be run from the current workspace. It can easily be done selecting the the current workspace (e.g. DevWorkspace)&amp;nbsp; and the notebook (e.g. Notebook1) as shown below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works perfectly but the issue pops up when the pipeline is deployed to another workspace (e.g ProdWorkspace). There is no Fabric deployment rule available a data pipeline to overwrite workspace from "DevWorkspace" to "ProdWorkspace" at the time of writing this post.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setting Fabric workspace&amp;nbsp;dynamically in pipeline&amp;nbsp;activity is easier with the availibility of system variable&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;SPAN&gt;pipeline().&lt;/SPAN&gt;&lt;SPAN&gt;DataFactory .&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is no inbuilt function available to set NotebookId dynamically. We could set fixed&amp;nbsp;NotebookId of Notebook1 in DevWorkspace but the NotebookId for the same Notebook would be different in ProdWorkspace.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Until there is a proper solution from Microsoft to tackle this issue, we need to build our own solution to set NotebookId dynamically irrespective&amp;nbsp;of the workspace the pipeline runs in.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am going to explain in 3 steps how I have achieved&amp;nbsp;this so that deployment to different workspace&amp;nbsp;goes smooth.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Background:&lt;/P&gt;&lt;P&gt;- Created Workspace&amp;nbsp;&lt;EM&gt;DevWorkspace&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;ProdWorkpace&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;- Created Lakehouse&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;LH_BRONZE&lt;/STRONG&gt;&lt;/EM&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;LH_SILVER&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and LH_GOLD (Medallian architecture)&lt;/P&gt;&lt;P&gt;- Created&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Notebook1&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Notebook2&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;which need to be run dynamically in&amp;nbsp;&lt;EM&gt;DevWorkspace&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;ProdWorkspace&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Create a notebook with name Notebook_config under DevWorkspace and written PySpark code to list all the fabric items in the "DevWorkspace" and store the information as a delta table "WorkspaceItems" in the bronze lakehouse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cell1# set default lakehouse to LH_BRONZE. This must be first cell in the notebook.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%%configure -f
{ 
    "defaultLakehouse": {
        "name": "LH_BRONZE",
    }
}​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cell2# list workspace items and insert into delta table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import pandas as pd
import sempy.fabric as fabric
from pyspark.sql.functions import *
from delta.tables import *

client = fabric.FabricRestClient()

workspaceId = fabric.get_workspace_id()

response = client.get(f"/v1/workspaces/{workspaceId}/items")

pd_df = pd.json_normalize(response.json()['value'])

spark.sql("SET spark.databricks.delta.schema.autoMerge.enabled = true") 

df_source = spark.createDataFrame(pd_df)

target_table_path = f"Tables/WorkspaceItems"

if DeltaTable.isDeltaTable(spark, f"{target_table_path}"):
    print("The Table already exists so merging data...")
    targetDeltaTable = DeltaTable.forPath(spark, target_table_path)
    (targetDeltaTable.alias("t")
        .merge(df_source.alias("s"), "s.id = t.id")
        .whenMatchedUpdateAll()
        .whenNotMatchedInsertAll()
        .whenNotMatchedBySourceDelete()
        .execute()
    )     
else:
    print("Creating new table and inserting data...")
    df_source.write.format("delta").mode("append").save(f"{target_table_path}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After the successful run of Notebook_config, Delta table WorkspaceItems is created and loaded with all the fabric items including NotebookIds of Notebook1 and Noteboook2 from the DevWorkspace as shown below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 2:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;Create a Data pipeline with name p_set_variables which will return NotebookIds of Notebook1 and Notebook2 using pipeline activities Lookup, Filter and set variables as shown below:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fig:&amp;nbsp;p_set_variables data pipeline with return variables&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fig: Lookup setting&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fig: Filter Notebook1 setting&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fig: Filter Notebook2 setting&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fig: Set variable settings as Pipeline return value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Step 3:&amp;nbsp;&lt;/STRONG&gt;Create a Data pipeline with name p_demo_pipeline1 where Notebook1 and Notebook2 need to be run. You need to add Invoke pipeline (legacy) and invoke the data pipeline&amp;nbsp;&lt;EM&gt;p_set_variable&amp;nbsp;&lt;/EM&gt;(step 2) which returns the NotebookIds of Notebook1 and Notebook2 as Pipeline return values.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fig: Invoking p_set_variables&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fig: Setting run Notebook1 dynamically using Workspace Id and Notebook Id.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fig: Setting run Notebook2 dynamically using Workspace Id and Notebook Id.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;Please note that once you deploy the Fabric workspace&amp;nbsp;items from DevWorkspace to ProdWorkspace, you need to run Notebook_Config one time to load fabric item list to delta table WorkspaceItems in lakehouse (LH_BRONZE) in the production workspace.&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;Please share your thoughts on this. Anyone has got an alternative simple solution, please share it.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;Regards&lt;/DIV&gt;&lt;DIV&gt;Khagendra&lt;/DIV&gt;</description>
      <pubDate>Mon, 25 Nov 2024 08:14:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4299424#M6470</guid>
      <dc:creator>KhagendraWagle</dc:creator>
      <dc:date>2024-11-25T08:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set NotebookId dynamically in notebook activity of data pipeline irrespective of Fabric workspace</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4301327#M6478</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="860922" data-lia-user-login="KhagendraWagle" class="lia-mention lia-mention-user"&gt;KhagendraWagle&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much for sharing this, it's very informative for anyone who has encountered similar issues before.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Adamk Kong&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 06:06:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4301327#M6478</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-26T06:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set NotebookId dynamically in notebook activity of data pipeline irrespective of Fabric workspace</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4339182#M6697</link>
      <description>&lt;P&gt;Very helpful, thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 22:11:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4339182#M6697</guid>
      <dc:creator>JohannUVA</dc:creator>
      <dc:date>2024-12-20T22:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set NotebookId dynamically in notebook activity of data pipeline irrespective of Fabric workspace</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4412351#M7090</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="860922" data-lia-user-login="KhagendraWagle" class="lia-mention lia-mention-user"&gt;KhagendraWagle&lt;/a&gt;&amp;nbsp;, this is a beautiful solution for limited sets of Notebooks and pipelines. If we are using thousand of items, what could be the best approach. Do you have any solutions to automate this scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Balveer&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2025 05:37:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4412351#M7090</guid>
      <dc:creator>balveertanwar</dc:creator>
      <dc:date>2025-02-16T05:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set NotebookId dynamically in notebook activity of data pipeline irrespective of Fabric workspace</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4596535#M7221</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="692956" data-lia-user-login="balveertanwar" class="lia-mention lia-mention-user"&gt;balveertanwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I agree that it is impossible to set up all the variables when you have hundreds of notebooks. Unfortunately, I do not have an alternative solution for this. I hope Microsoft comes up with a solution soon.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Khagendra&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 11:42:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4596535#M7221</guid>
      <dc:creator>KhagendraWagle</dc:creator>
      <dc:date>2025-03-05T11:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set NotebookId dynamically in notebook activity of data pipeline irrespective of Fabric workspace</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4740157#M8082</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="860922" data-lia-user-login="KhagendraWagle" class="lia-mention lia-mention-user"&gt;KhagendraWagle&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;first of all I really like your solution as it seems simple, yet very practical.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I have one question regarding your approach and correct my if I am wrong, but:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you set the connection for your lookup activity (LH_Bronze), will this always refer to the LH_Bronze in your DEV-Workspace? Because that one is not set dynamically and therefore the translation of "LH_Bronze" to the JSON-Code of a Lakehouse-Id is static I think.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please share your thoughts here, as I am also not fully sure here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Mats K&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 06:40:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4740157#M8082</guid>
      <dc:creator>matskah</dc:creator>
      <dc:date>2025-06-23T06:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set NotebookId dynamically in notebook activity of data pipeline irrespective of Fabric workspace</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4740164#M8083</link>
      <description>&lt;P&gt;Dear Mats,&lt;/P&gt;&lt;P&gt;The solution I shared was one we had successfully implemented in our Fabric platform. The Lakehouse itself was never the issue across environments — the pipeline always referenced the Lakehouse from the workspace it was running in.&lt;/P&gt;&lt;P&gt;However, our company has since updated its approach. We're now using the recently released &lt;STRONG&gt;Variable Library&lt;/STRONG&gt; feature. We've configured environment-specific variables within the library and are leveraging them across our data pipelines. The great benefit of the Variable Library is that it can be integrated at any point in the pipeline process, providing flexibility and cleaner configuration management.&lt;/P&gt;&lt;P&gt;I hope this helps clarify things.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Khagendra&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 06:54:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4740164#M8083</guid>
      <dc:creator>KhagendraWagle</dc:creator>
      <dc:date>2025-06-23T06:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set NotebookId dynamically in notebook activity of data pipeline irrespective of Fabric workspace</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4740266#M8084</link>
      <description>&lt;P&gt;Thank you very much for the clarification&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="860922" data-lia-user-login="KhagendraWagle" class="lia-mention lia-mention-user"&gt;KhagendraWagle&lt;/a&gt;&amp;nbsp;.&lt;BR /&gt;I'll definately have a look into Variable Librarys and give it a try!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Mats&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 07:29:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4740266#M8084</guid>
      <dc:creator>matskah</dc:creator>
      <dc:date>2025-06-23T07:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set NotebookId dynamically in notebook activity of data pipeline irrespective of Fabric workspace</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4927465#M9038</link>
      <description>&lt;P&gt;Another approach would be to use the Fabric REST api.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;First you need to create a Web v2 connection to https.api.fabric.microsoft.com/v1/&lt;/LI&gt;&lt;LI&gt;Next step is to use the connection to get the notebooks using a web activity with the created connection and the relative url "@&lt;SPAN&gt;concat(&lt;/SPAN&gt;&lt;SPAN&gt;'/workspaces/'&lt;/SPAN&gt;&lt;SPAN&gt;, pipeline().&lt;/SPAN&gt;&lt;SPAN&gt;DataFactory&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'/notebooks'&lt;/SPAN&gt;&lt;SPAN&gt;)"&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;Then add a filter to filter the notebook on the notebook name.&lt;BR /&gt;Items: "&lt;/SPAN&gt;&lt;/SPAN&gt;@&lt;SPAN&gt;activity(&lt;/SPAN&gt;&lt;SPAN&gt;'Get notebooks'&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN&gt;output&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;value"&lt;BR /&gt;Condition: "&lt;/SPAN&gt;&lt;/SPAN&gt;@&lt;SPAN&gt;equals(item().&lt;/SPAN&gt;&lt;SPAN&gt;displayName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Process Bronze Layer'&lt;/SPAN&gt;&lt;SPAN&gt;)"&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;Then you can use dynamic content for the notebook like this:&lt;BR /&gt;"@&lt;SPAN&gt;activity(&lt;/SPAN&gt;&lt;SPAN&gt;'Filter Bronze Notebook'&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN&gt;output&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;id"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jan 2026 23:16:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Set-NotebookId-dynamically-in-notebook-activity-of-data-pipeline/m-p/4927465#M9038</guid>
      <dc:creator>BramT</dc:creator>
      <dc:date>2026-01-26T23:16:34Z</dc:date>
    </item>
  </channel>
</rss>

