title: snowflake handle null while reading csv file
body: <p>I am trying to load a CSV file from S3. which has a null value in the integer type data field in the snowflake table.
  So I try to use IFFNULL function but gets the error.</p>
  <pre><code> Numeric value 'null' is not recognized.
  </code></pre>
  <p>For example when I try</p>
  <pre><code>select IFNULL(null,0)
  </code></pre>
  <p>I get the answer as 0.</p>
  <p>but the same thing when I try while reading the CSV file won't work</p>
  <pre><code>select $1,$2,ifnull($2,0)
  from 
  @stage/path
  (file_format =&gt; csv)
  </code></pre>
  <p>I get the null not recognized Error.
  and it fails when $2 is null.</p>
  <p>My csv format is as below.</p>
  <pre><code>create FILE FORMAT CSV 
  COMPRESSION = 'AUTO' FIELD_DELIMITER = ',' 
  RECORD_DELIMITER = '\n' SKIP_HEADER = 0 
  FIELD_OPTIONALLY_ENCLOSED_BY = '\042' 
  TRIM_SPACE = FALSE 
  ERROR_ON_COLUMN_COUNT_MISMATCH = TRUE ESCAPE = '\134' 
  ESCAPE_UNENCLOSED_FIELD = '\134' DATE_FORMAT = 'AUTO' 
  TIMESTAMP_FORMAT = 'AUTO' NULL_IF = ('\\N');
  </code></pre>
  <p>Basically, I am just trying to convert null to 0, when reading from the stage.</p>