Getting Null in lookup transformation data flow

Haider, Mustafa (Reigate) 25 Reputation points
2023-10-11T11:24:22.49+00:00

I have got two sources Source A contains AccountGroupName and Source B contains AccountGroupName and ID, I have created a lookup transformation and used AccountGroupName = AccountGroupName to get the ID which i want to insert to destionation.

e.g. AccountGroupName = ABC exists in both Source A and Source B so I should be getting the ID in the data flow to insert to destionation, but I am getting null. Do not understand why.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,303 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,494 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,436 questions
{count} votes

Accepted answer
  1. Bhargava-MSFT 31,246 Reputation points Microsoft Employee
    2023-10-16T20:11:39.4533333+00:00

    Hello Haider, Mustafa (Reigate),

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue: Getting Null in lookup transformation in the data flow

    Source A contains AccountGroupName

    Source B contains AccountGroupName and ID

    Using lookup transformation and AccountGroupName = AccountGroupName to get the ID to insert into a destination.

    AccountGroupName = ABC exists in both Source A and Source B

    How to get the ID in the data flow to insert to destination.

    Solution:

    Use trim and upper functions in both source and lookup values

    Expression: trim(upper("UsrName"))

    If I missed anything, please let me know, and I'd be happy to add it to my answer. Feel free to comment below with any additional information.

    I hope this helps!

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Haider, Mustafa (Reigate) 25 Reputation points
    2023-10-16T10:14:48.8033333+00:00
    trim(upper("UsrName")) 
    Used both trim and upper function in both source and lookup values. it is working now. thanks
    
    0 comments No comments

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.