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
1 Answer
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
DateTime.Now - DoB... or if your are using TSQLgetdate() - DoB.... something like that