How do I lookup a description for a value from input source file in Azure Data Factory?

sacotting 1 Reputation point
2020-07-07T14:23:22.133+00:00

Hi, I'm still very new to Azure Data Factory and thusfar have only used the copy activity using input from blob storage and writing to Azure SQL Database.

Now I have a situation where I have in input .csv file with 4 fields from blob storage. 3 of the fields will be mapped directly from the input .csv to the sql table. The 4th field is a string containing a login name (such as ig02377) that I need to use to read an employee table and get the corresponding guid for the login name. The guid will then be stored in the sql table instead of the login name.

So, I've been trying to figure out the best way to accomplish this. Do I use the copy activity as normal and accomplish this in a stored procedure? Or do I need to use the Lookup and ForEach activities to accomplish this?

I've tried to use the copy activity with a stored procedure but the problem that I encounter comes from the source being a string and the sink being a guid. I've also tried to find instructional videos online but the ones I have found are not my exact situation.

I would appreciate any insight and especially if someone has done the same type of thing in ADF.

Thanks!
Sallie Cottingham

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

1 answer

Sort by: Most helpful
  1. Vaibhav Chaudhari 38,721 Reputation points
    2020-07-07T15:43:09.2+00:00

    I've tried to use the copy activity with a stored procedure but the problem that I encounter comes from the source being a string and the sink being a guid. I've also tried to find instructional videos online but the ones I have found are not my exact situation.

    Within SP, you may try to have a staging table, insert the column data as string in here. Later cast the string column to GUID data type and dump the data to final table


    If the response helped, do "Accept Answer" and upvote it -- Vaibhav

    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.