CSV comma issue in sink (Azure DW)

Gowri Shankar 226 Reputation points
2020-12-14T08:12:48.383+00:00

Hi,

I want to move my file from azure blob to azure DW.
In azure blob, one of the table having column value like Naperville, IL.
I want this value to be written in to azure dw.
But when I try to write it into DW using (polybase copy), I am getting column count mismatch error and I believe this single column Naperville, IL is getting treated as two columns.
I tried with the source(blob) setting. But I am getting validation error, when try to control in source by making Escape(/) and Quote character (" double quote)
Validation error :
47779-validation-error.jpg
source setting:
47865-source-setting.jpg
In sink (azure DW), I could not able to see any setting.
sink setting :
47860-dw-sink.jpg
can you please guide me, how can i achieve it?

Thanks.

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

Accepted answer
  1. Saurabh Sharma 23,851 Reputation points Microsoft Employee Moderator
    2020-12-15T03:06:16.957+00:00

    @Gowri Shankar Thanks for using Microsoft Q&A.

    You get think kind of message with Polybase when your source data is not compatible with Polybase and thus you need to enable staging in your copy data via Azure blob or Azure Gen2 and ADF automatically converts the data to meet the data format requirements of Polybase. Please go to Settings tab of your copy data activity and select "Enable Staging" by providing storage path for your staging blob/Gen2. (See screenshot below).
    I, however, do not feel that doing that will fix your actual requirement to load comma separated texts as Text - Naperville, IL will be treated as two different columns. You may need to do some data scrubbing by using data flow ( for example - replacing , in the text with - or some other character OR using a different delimiter (other than ,)for the CSV file.

    48194-image.png

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Nasreen Akter 10,811 Reputation points Volunteer Moderator
    2020-12-15T02:53:28.18+00:00

    Hi @Gowri Shankar ,

    As you are having issue loading the CSV file, just a workaround, I was wondering, if you can create a different type of file e.g., .parquet instead of .csv and in the CopyActivity, use the parquet file(s) as a source and load them to DW.

    Thanks!

    1 person found this answer helpful.
    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.