Scenarios for using 'First Row Only' in lookup activity?

ArunRaaman 1,001 Reputation points
2023-01-20T22:58:28.6+00:00

Hello There,

While configuring 'lookup activity -- settings-tab' in ADF as part of my practice, I noticed a feature that should be taken care off to either check or uncheck. it is

'First row only' checkbox option. I tried using by checking and unchecking this option and observed the results, which is understandable.

However, what concerns me is what would be the real-use and scenarios to this option? I did some search over google for relevant scenarios, but, couldn't find anything helpful as such.

Would anyone please help me with the concern. Thank you for giving your valuable time and support. Below is the screenshot of it:

User's image

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,639 questions
0 comments No comments
{count} votes

Accepted answer
  1. Subashri Vasudevan 11,231 Reputation points
    2023-01-21T12:41:50.06+00:00

    Hi @ArunRaaman

    Couple of instances,

    1. To validate if a query returns a data set or not - like how we quickly do select top 1 from tablename particularly to save time. In case of a file, if you havent marked first row as header, then selecting First Row only will fetch you the header details.
    2. When just want to understand the schema or column names of the underlying table or file where we dont want complete data set but just one record would do. in case of selecting first row only, we will see all column names under firstrow tag as below from where we can determine if all columns that we want are there or a particular column is missing or not. {
      "firstRow":
      
      {
      
          "Id": "1",
      
          "schema":"dbo",
      
          "table":"Table1"
      
      }
      
      }

    Hope it answers your question. Feel free to write back for any question,


0 additional answers

Sort by: Most helpful

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.