azure data factory copy image

Yang Chow Mun 101 Reputation points
2022-04-26T09:56:50.607+00:00

I am trying to copy images from azure blob storage to azure MSSQL.
For the dataset setup in azure blob storage, I think the most suitable one will be binary.
But I am getting an error 'Sink must be binary when source is binary dataset' when trying to push it to the MSSQL.

May I know

  1. is it possible to copy image data using ADF else any other alternative for this
  2. what is the suitable data type for image when we are defining the dataset for ADF

Thanks,

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,617 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Samy Abdul 3,366 Reputation points
    2022-04-26T10:32:19.713+00:00

    Hi @Yang Chow Mun , When using Binary dataset in copy activity, you can only copy from Binary dataset to Binary dataset ,and Sink must be binary

    when source is binary dataset. Thanks


  2. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2022-05-02T07:11:52.283+00:00

    Hi @Yang Chow Mun ,

    Thank you for posting query in Microsoft Q&A Platform.

    We can use binary format when we want to copy file as it is from one location to another location. But as you rightly pointed in case of binary format your sink also should be binary.

    You can give try using deiminated text format with below setting to read your image as some text data and load that to your sink database column.

    198181-image.png

    Between, you also explore using azure functions or databricks notebooks to read image data and load to sink.

    Please try above and let us know how it goes. If you found any other work around feel free to share same.

    ----------

    Please consider hitting Accept Answer button. Accepted answers help community as well.

    0 comments No comments