I have to load multiple master tables from SQL Server to Azure ADLS using ADF. While loading I have to change the datatype of all column which are timestamp to string in a for each loop. Can this is possible using ADF ?
I tried for each loop of ADF, in that I used Copy data and tried to change the mapping configuration to map the timestamp datatype to string but was unable to do so.
1条答案
按热度按时间bz4sfanl1#
AFAIK, if your schema is same for all the master tables then it will automatically Change the data type to string if you specified it in mapping.
If you are creating file dynamically it will automatically store the data as string when it is (CSV or txt file)
IF schema is not same for all tables, then as @Nadeem said create SQL file with all your SQL statements including conversion/ casting of timestamp column and add it into ADLS.
Convert()
function: To convert a datetime to a string, you use the function as follows:then lookup the file using lookup activity
Lookup Output:
and loop over it with each query to copy the table with conversion on timestamp column.
Copy activity source setting: