Error in Lookup while getting distinct values

Manjari Manokar 1 Reputation point
2020-08-20T06:11:59.817+00:00

I am trying to do a look up on a table, preview data in the look up gets me the correct data when table option is chosen but when the query option is chosen and if I try to get the distinct values from the table it throws me an error18995-lookuptable.png

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,565 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,462 Reputation points Microsoft Employee
    2020-08-21T20:20:09.303+00:00

    Hi @Manjari Manokar ,

    Welcome to Microsoft Q&A and thanks for using this forum.

    As Vaibhav called out, if the lookup works when table option is selected, then ideally it should work with query unless if there is something wrong with the query formation. By looking at the error messages it seems that SQL is throwing error saying that object is invalid (please make sure the object name is correct in your query).

    • Are you using dynamic expression to form your query? If so could you please share the expression?
    • If you are using query directly without dynamic expression, then please try to copy it as is and execute it in SSMS to make sure the same query is working in SSMS. This is to check if the issue is with query formation.

    Let us know how it goes.

    Thanks


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.