title: Copy into stage with pipe delimited and null values
body: <p>I have some tables that I would like to export the results of into a internal (or external) stage of snowflake. The problem is Snowflake throws an error.</p>
  <pre><code>COPY INTO @test_stage/test_file.csv.gz FROM (
               SELECT *
                 FROM database.shema.table)
  file_format = (type = 'CSV' 
                 field_delimiter = '|' 
                 compression = 'gzip' 
                 null_if = () 
                 field_optionally_enclosed_by = None)
   HEADER = True
   OVERWRITE = True
   MAX_FILE_SIZE = 4900000000
   SINGLE = True;
  </code></pre>
  <p><strong>Cannot unload empty string without file format option field_optionally_enclosed_by being specified.</strong></p>
  <p>If I do not specify the field_optionally_enclosed_by I will get that error.</p>
  <p>If I set it field_optionall_enclosed_by to None I get that error (none is default).</p>
  <p>If I set it to a quote or double quote it’s fine but I do not want strings quoted. I want empty values like this:</p>
  <p>2020-05-10|||</p>
  <p>Not this:</p>
  <p>2020-05-10|&quot;&quot;|&quot;&quot;|</p>