<?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: How to use parameters in Lookup activity Query in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/How-to-use-parameters-in-Lookup-activity-Query/m-p/4957332#M9066</link>
    <description>&lt;P&gt;Convert the SQL into a stred procedure and when using the Lookup, select stored procedure then you can import the parameters into the lookup activity and place the parameter in the expression builder.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jan 2026 13:50:00 GMT</pubDate>
    <dc:creator>Thomaslleblanc</dc:creator>
    <dc:date>2026-01-29T13:50:00Z</dc:date>
    <item>
      <title>How to use parameters in Lookup activity Query</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/How-to-use-parameters-in-Lookup-activity-Query/m-p/4946741#M9059</link>
      <description>&lt;P&gt;Hey All,&lt;BR /&gt;&lt;BR /&gt;I'm new to fabric and running into a syntax issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a lookup activity that queries a on-prem database.&lt;/P&gt;&lt;P&gt;I want the query to return a file name. I'm just trying to learn and test how to do metadata checks to eventually buildout a pipeline that transfers data from files into on-prem db.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT file_name&lt;/P&gt;&lt;P&gt;FROM dbo.table&lt;BR /&gt;WHERE file_name = 'myFirstFile';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a parameter called file_name. I'm manually entering in the following query to be executed in the query lookup activity.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM dbo.table&lt;BR /&gt;WHERE file_name = @{pipeline().parameters.file_name}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When I click evaluate expression and enter a value for file_name parameter, fabric returns the query with the parameter inserted, but does not execute the query.&lt;/P&gt;&lt;P&gt;Literally, returns the following:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Preview content&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SELECT * FROM dbo.table WHERE file_name = myfirstfile&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any suggestions as to what I'm doing wrong?&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jan 2026 16:56:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/How-to-use-parameters-in-Lookup-activity-Query/m-p/4946741#M9059</guid>
      <dc:creator>Mr_Coffee</dc:creator>
      <dc:date>2026-01-28T16:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters in Lookup activity Query</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/How-to-use-parameters-in-Lookup-activity-Query/m-p/4955923#M9064</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="624536" data-lia-user-login="Mr_Coffee" class="lia-mention lia-mention-user"&gt;Mr_Coffee&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue arises because pipeline parameters in Fabric Lookup activities are not automatically recognized as SQL string literals. When you write WHERE file_name = @{pipeline().parameters.file_name}, Fabric inserts the parameter value directly into the query without quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if your parameter is a string such as myFirstFile, the query becomes WHERE file_name = myFirstFile, which SQL interprets as a column or identifier, resulting in an error. To resolve this, enclose the parameter in single quotes within your query: WHERE file_name = '@{pipeline().parameters.file_name}'. This adjustment ensures that SQL processes the value as a string, allowing the query to execute as intended. Please note that the UI preview only shows parameter substitution; the actual query is executed during pipeline runtime. With this change, your Lookup activity should function correctly, enabling you to proceed with your metadata driven pipeline.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Tejaswi.&lt;BR /&gt;Community Support&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2026 09:47:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/How-to-use-parameters-in-Lookup-activity-Query/m-p/4955923#M9064</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2026-01-29T09:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters in Lookup activity Query</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/How-to-use-parameters-in-Lookup-activity-Query/m-p/4957332#M9066</link>
      <description>&lt;P&gt;Convert the SQL into a stred procedure and when using the Lookup, select stored procedure then you can import the parameters into the lookup activity and place the parameter in the expression builder.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2026 13:50:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/How-to-use-parameters-in-Lookup-activity-Query/m-p/4957332#M9066</guid>
      <dc:creator>Thomaslleblanc</dc:creator>
      <dc:date>2026-01-29T13:50:00Z</dc:date>
    </item>
  </channel>
</rss>

