how to quote null or int value in copy activity

Liming Wang 1 Reputation point
2020-08-19T15:18:47.55+00:00

I use copy activity to move data from sql database to BlobStorage(csv file).I also defined the csv file with double quote character in dataset.But when sql query result is null or int,it can't quote with double quote.

csv output result
"ab",1,,"ac"

csv expect result
"ab","1","","ac"

is there anyway to resolve the problem?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vaibhav Chaudhari 38,916 Reputation points Volunteer Moderator
    2020-08-19T15:37:50.59+00:00

    So it is adding quotes only for string data. If quotes are needed for integer or blanks, nulls as well - you can try casting all the columns to string like SELECT cast(col1 as nvarchar(100) ...


    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.