title: How does unloading an empty table from redshift to s3 behaves?
body: <p>If an empty table is unloaded from redshift to S3 using UNLOAD command, does it creates an empty file on S3 or does it not do anything.</p>
  
  <p>Earlier (few days back ) I unloaded using unload command command, it placed a 0 byte file on s3. But today it is not doing anything (that is, there is no file placed on s3) but redshift is showing "UNLOAD completed, 0 record(s) unloaded successfully" message.
  Even using HEADER (to unload with headers) in the options of UNLOAD command is not showing any file on s3.</p>
  
  <pre><code>UNLOAD ($$ SELECT * FROM &lt;table_name&gt; $$) TO 
  's3://&lt;bucket_name&gt;/abc/test1' 
  iam_role '&lt;iam_role&gt;' ADDQUOTES HEADER ALLOWOVERWRITE DELIMITER AS ',' 
  ESCAPE PARALLEL OFF
  </code></pre>