<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>2025-2026 on Hat Full of Data</title><link>https://hatfullofdata.blog/tags/2025-2026/</link><description>Recent content in 2025-2026 on Hat Full of Data</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><lastBuildDate>Wed, 11 Feb 2026 17:21:27 +0000</lastBuildDate><atom:link href="https://hatfullofdata.blog/tags/2025-2026/index.xml" rel="self" type="application/rss+xml"/><item><title>Using Variable Library in a Dataflow</title><link>https://hatfullofdata.blog/using-variable-library-in-a-dataflow/</link><pubDate>Wed, 11 Feb 2026 17:21:24 +0000</pubDate><guid>https://hatfullofdata.blog/using-variable-library-in-a-dataflow/</guid><description>&lt;img src="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/cover.png" alt="Featured image of post Using Variable Library in a Dataflow" /&gt;&lt;p&gt;One of the popular low-code tools within Microsoft Fabric is the Gen2 Dataflow. Power BI report builders already know some Power Query. So armed with this knowledge is a popular starting point to load data into Microsoft Fabric. Adding values from the Variable Library in a Dataflow is an obvious plan to make it more future proof and to work better with Deployment pipelines.&lt;/p&gt;
&lt;p&gt;I will confess the first time I tried these I could not get them to work till I read the instructions correctly. So they do work just understand the limitations!&lt;/p&gt;
&lt;h2&gt;Variable Library Series&lt;/h2&gt;
&lt;p&gt;Variable libraries should be part of every project. This post is part of my series to help get you started creating the library and then using the variables and finally seeing your hard work pay back when it comes to deployment pipelines.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/variable-library/"&gt;Getting started with variable libraries&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/"&gt;Variable Values in a Fabric Notebook&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/"&gt;Variable Values in a Data Pipeline&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/"&gt;Variable Values in Lakehouse Shortcuts&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Variable Values in Dataflows&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/variable-libraries-in-deployment-pipelines/"&gt;Variable Libraries in Deployment Pipelines&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/connection-variables-in-variable-library/"&gt;Connection variables in a variable library&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="scenario"&gt;Scenario
&lt;/h2&gt;&lt;p&gt;For this post we are going to use the scenario of a dataflow query that lists projects. Whilst we are developing the data handling we want to limit the number of rows loaded and in production we will have no limit.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of the steps described in the next paragraph." class="gallery-image" data-flex-basis="379px" data-flex-grow="158" height="430" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I create the dataflow and then using Keep Rows, I select Keep top rows. In the next dialog I enter 5 and click OK. This results in a table with only 5 rows of data. The number of rows though needs to come from the variable library.&lt;/p&gt;
&lt;h2 id="getting-the-value"&gt;Getting the Value
&lt;/h2&gt;&lt;p&gt;The next step is to get the value from the variable library into the dataflow. We are going to use a new Power Query function for this called &lt;strong&gt;Variable.ValueOrDefault&lt;/strong&gt;. For the first parameter of this function, you need the Variable Library name and a Variable name. Then you combine together in a string.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;$(/**/&amp;lt;Library Name&amp;gt;/&amp;lt;Variable Name&amp;gt;)&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;So for my example the string will be &lt;strong&gt;“$(/**/Finance Variables/Limit)”&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="snapshots of getting the variable value from variable library in a dataflow" class="gallery-image" data-flex-basis="582px" data-flex-grow="242" height="280" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/image-1.png" width="680"&gt;&lt;/p&gt;
&lt;blockquote class="alert alert-note"&gt;
 &lt;div class="alert-header"&gt;
 &lt;span class="alert-icon"&gt;📝&lt;/span&gt;
 &lt;span class="alert-title"&gt;Instructions&lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="alert-body"&gt;
 &lt;ol&gt;
&lt;li&gt;On the Home ribbon, expand Get data and select Blank query.&lt;/li&gt;
&lt;li&gt;Rename the query to DataRows.&lt;/li&gt;
&lt;li&gt;Then in the formula bar enter in the code below.&lt;/li&gt;
&lt;li&gt;This will return the current value of the variable in the library.&lt;/li&gt;
&lt;/ol&gt;
 &lt;/div&gt;
 &lt;/blockquote&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Variable.ValueOrDefault(&amp;#34;$(/**/Finance Variables/Limit)&amp;#34;,2)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;blockquote class="alert alert-tip"&gt;
 &lt;div class="alert-header"&gt;
 &lt;span class="alert-icon"&gt;💡&lt;/span&gt;
 &lt;span class="alert-title"&gt;Tip&lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="alert-body"&gt;
 &lt;p&gt;The documentation as of publishing this post states it won’t work hence we use the OrDefault function and in this example the default is 2. It does work though, and we can see the answer 8 comes through.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/blockquote&gt;
&lt;h2 id="using-the-variable-value"&gt;Using the Variable Value
&lt;/h2&gt;&lt;p&gt;We’ve got the variable value from the variable library in a dataflow, now we need to use it. In the last line of my project query that limited the query to 5 rows I can replace the 5 with DataRows. I now get 8 rows of data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshot of the data table showing there are only 8 rows of data" class="gallery-image" data-flex-basis="468px" data-flex-grow="195" height="348" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/image-2.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This works as long as we always want to limit the rows, the chances are in production we don’t want to limit, so I add the extra of only limit if DataRows is greater than 0. Here is my new statement, the previous step is call Sorted Rows hence the #”Sorted rows”&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;if DataRows &amp;gt; 0 then Table.FirstN(#&amp;#34;Sorted rows&amp;#34;, DataRows) else #&amp;#34;Sorted rows&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="references-for-variable-library-in-a-dataflow"&gt;References for Variable Library in a Dataflow
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-factory/dataflow-gen2-variable-library-integration?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;Microsoft – Use Fabric variable libraries in Dataflow Gen2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/powerquery-m/variable-valueordefault?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;Power Query Reference for Variable.ValueOrDefault&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="conclusion-on-using-variable-library-in-a-dataflow"&gt;Conclusion on using variable library in a dataflow
&lt;/h2&gt;&lt;p&gt;Its great we can bring in the values easily. Its a shame that we can’t use them to control the destination, but that is on the road map for 2026 Q1. I’ll blog about it as soon as it arrives! I highly recommend using my pattern of fetching the value as a query and then referring to that. It will help in debugging etc.&lt;/p&gt;</description></item><item><title>Using a Variable Library in Lakehouse Shortcuts</title><link>https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/</link><pubDate>Mon, 26 Jan 2026 18:43:51 +0000</pubDate><guid>https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/</guid><description>&lt;img src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/cover.png" alt="Featured image of post Using a Variable Library in Lakehouse Shortcuts" /&gt;&lt;p&gt;Lakehouse shortcuts are a popular addition to the Fabric set of tools to access data easily without copying it. Using a variable library in lakehouse shortcuts means its easy to point shortcuts to an alternative location. This great for ALM using development, test and production workspaces.&lt;/p&gt;
&lt;h2&gt;Variable Library Series&lt;/h2&gt;
&lt;p&gt;Variable libraries should be part of every project. This post is part of my series to help get you started creating the library and then using the variables and finally seeing your hard work pay back when it comes to deployment pipelines.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/variable-library/"&gt;Getting started with variable libraries&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/"&gt;Variable Values in a Fabric Notebook&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/"&gt;Variable Values in a Data Pipeline&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Variable Values in Lakehouse Shortcuts&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/"&gt;Variable Values in Dataflows&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/variable-libraries-in-deployment-pipelines/"&gt;Variable Libraries in Deployment Pipelines&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/connection-variables-in-variable-library/"&gt;Connection variables in a variable library&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="setting-up-the-shortcuts"&gt;Setting Up the Shortcuts
&lt;/h2&gt;&lt;p&gt;Using the standard GUI you have no option to use a variable library values in the setup of the shortcuts. So set up your shortcuts as you normally and make sure they work. For this post I’m using a shortcut to a table in warehouse. (I had a whole barny with lakehouses and schemas and it not working – another post for another time!)&lt;/p&gt;
&lt;p&gt;&lt;img alt="snapshot of a projects shortcut in the explorer pane." class="gallery-image" data-flex-basis="577px" data-flex-grow="240" height="416" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-12.png" srcset="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-12_hu_3c99a595335523c2.png 800w, https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-12.png 1001w" width="1001"&gt;&lt;/p&gt;
&lt;p&gt;According to the documentation using the rest API also does not allow for the use of variables in the creation of shortcuts.&lt;/p&gt;
&lt;h2 id="viewing-the-options"&gt;Viewing the Options
&lt;/h2&gt;&lt;p&gt;If we select the short cut and click on the 3 dots to expand the menu we can then click on Manage Shortcut. This opens a pan that shows the values behind the shortcut. The values that be populated from a variable library have a Variable drop down, so we can see Target workspace, Target item and Target path.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshot of the exploere and manage shortcut panes" class="gallery-image" data-flex-basis="292px" data-flex-grow="121" height="558" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-13.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I only want to populate the workspace and item guids, so I set up a those variables in my variable library. The variables must be set up as strings, they might look like guids but the shortcut demands they are strings. I set the default values to match the current values. When we apply each variables it will check the current values work so it only works if you use the current values.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshot of the variable library" class="gallery-image" data-flex-basis="620px" data-flex-grow="258" height="263" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-15.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="applying-the-variables"&gt;Applying the Variables
&lt;/h2&gt;&lt;p&gt;Back in the Manage Shortcut pane click on the Variable below the current value to expand that section. Then click on Select variable to open the Select variable dialog. Click on the correct variable and then click Select Variable. This will update the value to come from the variable.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshots of clicking on select variable and selecting the right one" class="gallery-image" data-flex-basis="538px" data-flex-grow="224" height="303" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-16.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once you have pointed it to the variable there does not appear to be a method to change back to a hard coded value.&lt;/p&gt;
&lt;h2 id="updating-variable-values"&gt;Updating Variable Values
&lt;/h2&gt;&lt;p&gt;Variable values will get updated, the most common being a different active set being selected. For other artifacts the change will get picked up when they execute or refresh. For shortcuts this is slightly different. You need to force the updating of variables.&lt;/p&gt;
&lt;p&gt;Open the lakehouse and stay in the lakehouse view. On the ribbon the last button is Update all variables. A message will show the updating is taking and finally there will be a notification to say they have been updated.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Updating variable library in lakehouse shortcuts" class="gallery-image" data-flex-basis="228px" data-flex-grow="95" height="682" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/2026-01-26_16-40-32.png" width="648"&gt;&lt;/p&gt;
&lt;p&gt;If one of the shortcut fails in the update please be aware the successful ones will have updated. You do get a notification and an error message that tries to help.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshots of updatings the variables" class="gallery-image" data-flex-basis="361px" data-flex-grow="150" height="451" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/2026-01-26_16-58-29.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion-on-variable-library-in-lakehouse-shortcuts"&gt;Conclusion on Variable Library in Lakehouse Shortcuts
&lt;/h2&gt;&lt;p&gt;I really like that the variable libraries can be accessed directly in the shortcut details, there is no pre-loading. I would prefer that I could change the values and then press apply so that each value isn’t checked individually. My experience in deployment pipelines means I fell foul of not realising I needed to refresh the variable values.&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;p&gt;Creating Shortcuts – &lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-shortcuts?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-shortcuts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Microsoft Learn – &lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/onelake/assign-variables-to-shortcuts?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/onelake/assign-variables-to-shortcuts&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Using a Variable Library in a Data Pipeline</title><link>https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/</link><pubDate>Mon, 19 Jan 2026 10:36:26 +0000</pubDate><guid>https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/</guid><description>&lt;img src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/cover.png" alt="Featured image of post Using a Variable Library in a Data Pipeline" /&gt;&lt;p&gt;You’ve set up your variable pipeline with WorkspaceIDs and LakehouseIDs etc etc Now you want to use that variable library in a data pipeline so we can use the common values and they will behave in a deployment pipeline.&lt;/p&gt;
&lt;h2&gt;Variable Library Series&lt;/h2&gt;
&lt;p&gt;Variable libraries should be part of every project. This post is part of my series to help get you started creating the library and then using the variables and finally seeing your hard work pay back when it comes to deployment pipelines.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/variable-library/"&gt;Getting started with variable libraries&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/"&gt;Variable Values in a Fabric Notebook&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Variable Values in a Data Pipeline&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/"&gt;Variable Values in Lakehouse Shortcuts&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/"&gt;Variable Values in Dataflows&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/variable-libraries-in-deployment-pipelines/"&gt;Variable Libraries in Deployment Pipelines&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/connection-variables-in-variable-library/"&gt;Connection variables in a variable library&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="adding-the-variables-to-the-data-pipeline"&gt;Adding the Variables to the Data Pipeline
&lt;/h2&gt;&lt;p&gt;Before you can use the variable library in a data pipeline you need to add the variables. In your data pipeline you need to click on the grey background to bring up the section on the bottom of the screen with Parameters, Variables etc. If you are in a brand new pipeline you need to click on the settings cog first, then it will appear.&lt;/p&gt;
&lt;p&gt;Select the Library Variables section. Then click on +New and the select variable dialog box appears. If you have multiple variable libraries you can select the right one, you can also search for a variable in the top right. Once you select a variable click on Select Variable button to add that variable to the pipeline.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot showing the Library values section in the pipeline. The the steps to add a variable from a variable library to a data pipelines" class="gallery-image" data-flex-basis="482px" data-flex-grow="201" height="338" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/Variable-Library-003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Yes you have to add each variable in turn, no multi-select. You can rename the variables but please don’t, name your variables in your library better.&lt;/p&gt;
&lt;h2 id="using-variable-values"&gt;Using Variable Values
&lt;/h2&gt;&lt;p&gt;You can use the variable values anywhere you can use Dynamic Content. Click on the Add Dynamic content link to open the Pipeline expression builder. Click on the three dots to select Library variables. Click on the variable value you want to use to enter in the formula into the expression. Click OK to put the formula back into the box.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshot of adding dynamic content to get Variable Values" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/Variable-Library-004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;You can use the variable value inside any functions if required.&lt;/p&gt;
&lt;h2 id="using-variables-for-data-connections"&gt;Using Variables for Data Connections
&lt;/h2&gt;&lt;p&gt;When a data pipeline move from a dev workspace to test workspace and then onto production workspace we need to change the details of the connections to the new values. For this post we will use a connection to a Fabric warehouse in a workspace. I want to pull the values from a table in the warehouse using a lookup action.&lt;/p&gt;
&lt;p&gt;I need to create the following variables in the library:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Project_Warehouse_Connection_ID&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Project_Workspace_ID&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Project_Warehouse_ID&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Project_Warehouse_Connection_String&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="connection-ids"&gt;Connection IDs
&lt;/h3&gt;&lt;p&gt;For the connection guid you need to click on the cog on the top bar and select Manage connections and gateways. From the list of connections, find the one you are using. From the three dots menu select settings. The Connection ID will be listed and can be highlighted and copied.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shots of the steps to get a connection ID" class="gallery-image" data-flex-basis="265px" data-flex-grow="110" height="614" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/image-7.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="workspace-warehouse-and-lakehouse-ids"&gt;Workspace, Warehouse and Lakehouse IDs
&lt;/h3&gt;&lt;p&gt;IDs for most artifacts can be found when it is opened. Be aware groups=workspaces in the url. Lakehouses have 2 IDs, one for the lakehouse and one for the SQL analytics endpoint or lakewarehouse as the url names it. No comment on names to confuse us!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of the address bar in a browser highlighting the Workspace ID and Warehouse ID" class="gallery-image" data-flex-basis="1833px" data-flex-grow="764" height="89" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/image-8.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="connection-string"&gt;Connection String
&lt;/h3&gt;&lt;p&gt;The final part needed is the connection string for the warehouse or lakehouse. The easiest way to copy this is to open the lakehouse SQL endpoint or the warehouse and in the bottom left hand corner is a Copy SQL connection string link.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen shot of the Copy SQL coonnection string link" class="gallery-image" data-flex-basis="716px" data-flex-grow="298" height="189" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/image-9.png" width="564"&gt;&lt;/p&gt;
&lt;p&gt;It can also be found in the lakehouse or warehouse settings under SQL analytics endpoint.&lt;/p&gt;
&lt;h3 id="variable-library"&gt;Variable Library
&lt;/h3&gt;&lt;p&gt;All these values need saving into the Variable Library. I’ve used Guid for the IDs and String for the connection string.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of the Finance_Variables variable library with the 4 variables setup." class="gallery-image" data-flex-basis="473px" data-flex-grow="197" height="344" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/image-10.png" width="679"&gt;&lt;/p&gt;
&lt;h2 id="using-the-variables-in-the-activities"&gt;Using the Variables in the Activities
&lt;/h2&gt;&lt;p&gt;We now need to use the variable values from the variable library in a data pipeline activity connection. We start by adding all 4 variables to the library. Note the guids become strings.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of the Library variables from the variable library in a data pipeline settings." class="gallery-image" data-flex-basis="549px" data-flex-grow="228" height="297" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/image-11.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In this post for simplicity I’m using a Lookup activity to just get all the rows from the projects table. So I add a lookup activity and fill in the general details. On the Settings tab I click the drop down for Connection and select Use dynamic content. In the Add dynamic content pane I find Library Variables under the three dots and select FinanceVariables_Warehouse_Connection_ID so it appears in the expression box. Then I click OK for the Connection to now be an expression.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshots of the steps described in the previous paragraph." class="gallery-image" data-flex-basis="398px" data-flex-grow="165" height="410" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/Variable-Library-006.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once the connection has been populated you can select the connection type, in my case Warehouse. Then the text boxes appear to take the Workspace ID, Warehouse ID and SQL Connection string. They all have a link to Add dynamic content.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="496px" data-flex-grow="206" height="329" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/Variable-Library-007.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The table drop down can be populated by entering manually or by clicking Refresh. This will open a pane showing the values that are going to be used in the connection. Click OK to start it fetching the list of tables. Once a table is selected if you click Preview data the same pane appears confirming values. Its a great way to test the connection works.&lt;/p&gt;
&lt;p&gt;You now have a variable values from a variable library in a data pipeline activity. Well done!&lt;/p&gt;
&lt;h2 id="conclusion-on-using-a-variable-library-in-a-data-pipeline"&gt;Conclusion on Using a Variable Library in a Data Pipeline
&lt;/h2&gt;&lt;p&gt;I like how simple it is to use the variables and that you get to select the variables needed in this data pipeline. I’d prefer if you could add multiple variables at a time. I like the consitent use of the expression builder so its something we get familiar with.&lt;/p&gt;
&lt;p&gt;I’d also really like it if in lineage view you could see which artifacts are using of the variable library and the impact was also included. Maybe oneday!&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-factory/variable-library-integration-with-data-pipelines?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-factory/variable-library-integration-with-data-pipelines&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>