<?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: dynamic library variables in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/dynamic-library-variables/m-p/4670406#M7640</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="297152" data-lia-user-login="krhacke" class="lia-mention lia-mention-user"&gt;krhacke&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;As of now, Microsoft has not officially announced that this feature will be included in the General Availability (GA) release either. Library variables must be referenced statically in the pipeline at design time, and expressions like @concat()or indexing into pipeline().library variables dynamically are not evaluated in a way that resolves the actual variable content.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If supporting dynamic referencing of library variables is important for your use case, it’s recommended to submit feedback via &lt;A href="https://ideas.fabric.microsoft.com/" target="_blank"&gt;Microsoft Fabric Ideas&lt;/A&gt; so that it can be considered for future updates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Thank You!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Apr 2025 09:26:53 GMT</pubDate>
    <dc:creator>v-karpurapud</dc:creator>
    <dc:date>2025-04-28T09:26:53Z</dc:date>
    <item>
      <title>dynamic library variables</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/dynamic-library-variables/m-p/4663725#M7587</link>
      <description>&lt;P&gt;I'm trying to use the new library variables to dynamically call a workspace / notebook.&amp;nbsp; The standard syntax to call dymanic library variable looks something like this, with the actual notebook name at the end:&lt;BR /&gt;&lt;BR /&gt;&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;libraryVariables&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;nb_table_transformation&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I would like to pass my json variable to dynamically change the notebook name.&amp;nbsp; I've tried a couple options:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1)&amp;nbsp; Concatinating the base syntax with the dynamic value coming from json&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;@concat('pipeline().libraryVariables.', json(pipeline().parameters.TaskStep.Notebook).NotebookId)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2)&amp;nbsp; Create a standard variable that is resolved in a previous step using the json and then concatenate it into the library variable syntax&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;@concat('pipeline().libraryVariables.', variables('v_notebook'))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Although both of these methods resolve the syntax correctly, the library variable does not resolve the underlying guid that I have created in my library variable set up.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any ideas on how to make this work?&amp;nbsp; Is this something that isn't yet available (being public preview) with library variables?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any suggestions / info would be greatly appreciated!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Apr 2025 18:02:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/dynamic-library-variables/m-p/4663725#M7587</guid>
      <dc:creator>krhacke</dc:creator>
      <dc:date>2025-04-22T18:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic library variables</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/dynamic-library-variables/m-p/4664242#M7590</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="297152" data-lia-user-login="krhacke" class="lia-mention lia-mention-user"&gt;krhacke&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the Microsoft Fabric Community Forum.&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;We understand you are encountering an issue iwth dynamic libarary variables. As Library Variables are designed to store reusable configurations at the workspace level and are referenced using&amp;nbsp;@pipeline().libraryVariables.&amp;lt;variable_name&amp;gt;.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dynamic Concatenation (@concat('pipeline().libraryVariables.',json(pipeline().parameters.TaskStep.Notebook).NotebookId))may not work as expected because the expression engine treats it as a literal string or fails to resolve the GUID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Library variables are resolved at runtime, but the dynamic construction of the variable name may not be fully supported in the current preview, as the engine might not dereference the concatenated string to the actual library variable.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Dynamic key resolution (e.g.,&amp;nbsp;pipeline().libraryVariables[variables('v_notebook')]) isn't supported in the current preview, requiring hardcoded keys instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To resolve this, consider a workaround that aligns with ADF’s current capabilities while achieve the goal of dynamically selecting a notebook based on a JSON parameter. &lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Using a &lt;STRONG&gt;Switch activity&lt;/STRONG&gt;&amp;nbsp; to map the JSON parameter to the corresponding library variable explicitly, avoiding dynamic key concatenation.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Set up library variables in the ADF workspace, mapping them to notebook paths or GUIDs (e.g.,&amp;nbsp;nb_table_transformation,&amp;nbsp;nb_other_transformation).&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Create a pipeline parameter&amp;nbsp;TaskStep&amp;nbsp;to include the notebook ID in JSON format (e.g.,&amp;nbsp;{"Notebook": {"NotebookId": "nb_table_transformation"}}).&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Extract Notebook ID: Use a Set Variable activity to extract the notebook ID from the JSON parameter and store it in a variable (v_notebook_id).&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Use a Switch Activity: Add a Switch activity to map the notebook ID to the corresponding library variable:&lt;BR /&gt;&lt;BR /&gt;Case:&amp;nbsp;nb_table_transformation: Set the notebook path to@pipeline().libraryVariables.nb_table_transformation.&lt;BR /&gt;Default Case: Add a Fail activity or a no-op activity with a message like "Invalid NotebookId".&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;This approach ensures explicit mapping of the notebook ID to the library variable, avoiding dynamic concatenation issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this response resolves your query, kindly mark it as &lt;STRONG&gt;Accepted Solution&lt;/STRONG&gt; to help other community members. A &lt;STRONG&gt;Kudos&lt;/STRONG&gt; is also appreciated if you found the response helpful.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank You!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 05:10:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/dynamic-library-variables/m-p/4664242#M7590</guid>
      <dc:creator>v-karpurapud</dc:creator>
      <dc:date>2025-04-23T05:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic library variables</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/dynamic-library-variables/m-p/4664962#M7591</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/883005" target="_self"&gt;&lt;SPAN class=""&gt;v-karpurapud&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;- thank you for your response!&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You mentioned that dynamic construction of library variables isn't supported in the current preview.&amp;nbsp; Is this something that will be included in the GA release?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We currently hardcode workspace and notebook guids in each of our source systems' notebook json workbenches.&amp;nbsp; However, as these change from dev to test to prod workspaces, my client feels it's burdonsome to have to update these at each step in each workbench.&amp;nbsp; It would be great to be able to set these name / guid values in a library variable once, then use just the name for each in the json.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 13:14:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/dynamic-library-variables/m-p/4664962#M7591</guid>
      <dc:creator>krhacke</dc:creator>
      <dc:date>2025-04-23T13:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic library variables</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/dynamic-library-variables/m-p/4670406#M7640</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="297152" data-lia-user-login="krhacke" class="lia-mention lia-mention-user"&gt;krhacke&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;As of now, Microsoft has not officially announced that this feature will be included in the General Availability (GA) release either. Library variables must be referenced statically in the pipeline at design time, and expressions like @concat()or indexing into pipeline().library variables dynamically are not evaluated in a way that resolves the actual variable content.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If supporting dynamic referencing of library variables is important for your use case, it’s recommended to submit feedback via &lt;A href="https://ideas.fabric.microsoft.com/" target="_blank"&gt;Microsoft Fabric Ideas&lt;/A&gt; so that it can be considered for future updates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Thank You!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 09:26:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/dynamic-library-variables/m-p/4670406#M7640</guid>
      <dc:creator>v-karpurapud</dc:creator>
      <dc:date>2025-04-28T09:26:53Z</dc:date>
    </item>
  </channel>
</rss>

