title: TPT Script to ignore comma delimeter in double quote
body: <blockquote>
    <p>I have written a TPT Script to load csv file to teradata</p>
  </blockquote>
  
  <pre><code>A,   B,   C,   D
  
  1,"hELL,O", 345,,, ME
  2,"HELLO,34" 456,,, REC
  3,"QWERTY,45", 456,,, WER
  </code></pre>
  
  <blockquote>
    <p>Column B is having double quote and comma as well. I would like to ignore that comma inside double quote</p>
  </blockquote>
  
  <p>I am using below attributes in tpt. Please suggest if it can be handle in TPT Script or need to do shell command in csv file (sed,awk command to deal with it)</p>
  
  <pre><code>    (
        VARCHAR DirectoryPath = '/home/xyz/',
        VARCHAR FileName = @file_name,
        VARCHAR Format = 'Delimited',
        VARCHAR OpenMode = 'Read',
        VARCHAR TextDelimiter = ',',
        VARCHAR NullColumns = 'Y',
        INTEGER SkipRows = 1,
        VARCHAR SkipRowsEveryFile = 'Y'
  )````
  
  Unix Command, that I tried to replace comma with pipe and to ignore comma in double quotes
  
  ````awk 'BEGIN { FPAT="([^,]+)|(\"[^\"]+\")"; OFS="|" } $1=$1' $FILE_NAME_OUT1 &gt; $FILE_NAME_OUT2
  
  </code></pre>
  
  <p>It is not working, it is removing the column field (comma ,)</p>
  
  <p>For example:-</p>
  
  <pre><code>A,   B,   C,   D
  
  1|"hELL,O"| 345| ME
  2|"HELLO,34" 456| REC
  3|"QWERTY,45"| 456| WER
  </code></pre>
  
  <p>Please suggest on this.</p>