question

PatrickCampbell-2088 avatar image
0 Votes"
PatrickCampbell-2088 asked HimanshuSinha-MSFT answered

Is it possible to preserve the varchar type when copying via ADF?

The "copy" activity in ADF applies an automatic conversion from varchar(N) to string. We rely on the type of some columns being explicitly varchar. Is there a way to actually copy the data as-is when going between two databases of the exact same type?

azure-data-factory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PatrickCampbell-2088 avatar image
0 Votes"
PatrickCampbell-2088 answered

It appears that the actual copy task does preserve the varchar type, though in the review of the mapping column mapping it looks like it will be copied to string. If anyone has knowledge about how the type mappings work in the copy task, I'd still appreciate clear documentation/reference regarding default type mappings, in particular with respect to varchars. Thanks!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HimanshuSinha-MSFT avatar image
0 Votes"
HimanshuSinha-MSFT answered

Hello @PatrickCampbell-2088 ,

Thanks for the ask and as you already found when you copy data from table to table the data types are preserved . On the other ask I think the best document which I was able to find is here , but does not talk about varchar . Microsoft always keeps updating the document , so I could request you to please visit the page and create a feedback on the page , that way someone will review the ask and update the document .

Thanks
Himanshu


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.