1

I have a CSV file which contains Name and DOB of persons. I want to store it in Azure SQL database with an additional column of Age which has to be calculated using current date and DOB (from CSV file). Please suggest how to find age in a pipeline activity from this file and store in database. Thanks

13
  • DateTime.Now - DoB... or if your are using TSQL getdate() - DoB .... something like that Commented Jun 2, 2016 at 11:33
  • But where to specify this calculation in my data factory pipeline? Commented Jun 2, 2016 at 11:44
  • How do you import your file into your DB ? Commented Jun 2, 2016 at 11:56
  • I am using a copy activity in data factory. But obviously in this case, the Age column is being null as blob contains only name and DOB. So I need to find Age and put it along with other data from blob in database. Commented Jun 2, 2016 at 11:57
  • can you just create a computed column in your SQL DB ? Commented Jun 2, 2016 at 12:03

1 Answer 1

2

One of the simplest ways to go about doing this is by invoking a stored procedure on the destination (Azure SQL DB) from within the copy activity. You can pass the ADF system variable 'WindowStart' as a parameter to the stored procedure and within the stored procedure the age calculation can be done. This link (https://azure.microsoft.com/en-us/documentation/articles/data-factory-azure-sql-connector/#invoking-stored-procedure-for-sql-sink) would help.

Thanks, Harish

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.