title: Can I use snowflake snowsql !spool command to overwrite existing file?
body: <p>When I use the !spool command, the target file is appended with the results.
  Example:</p>
  
  <pre><code>$ touch current.spool
  $ cat curr_ts.sql
  !spool current.spool
  select CURRENT_TIMESTAMP;
  
  $ snowsql -f  curr_ts.sql  &lt;--- 1st execution of the script
  * SnowSQL * v1.1.86
  Type SQL statements or !help
  +-------------------------------+
  | CURRENT_TIMESTAMP             |
  |-------------------------------|
  | 2020-04-21 13:35:59.983 -0400 |
  +-------------------------------+
  1 Row(s) produced. Time Elapsed: 0.096s
  Goodbye!
  
  $ cat current.spool
  +-------------------------------+
  | CURRENT_TIMESTAMP             |
  |-------------------------------|
  | 2020-04-21 13:35:59.983 -0400 |
  +-------------------------------+
  
  $ snowsql -f  curr_ts.sql  &lt;--- 2nd (supposedly independent) execution of the script
  * SnowSQL * v1.1.86
  Type SQL statements or !help
  +-------------------------------+
  | CURRENT_TIMESTAMP             |
  |-------------------------------|
  | 2020-04-21 13:36:17.629 -0400 |
  +-------------------------------+
  1 Row(s) produced. Time Elapsed: 0.098s
  Goodbye!
  [1019] bjs13b@igloo:/home/bjs13b/snowsql $ cat current.spool
  +-------------------------------+
  | CURRENT_TIMESTAMP             |
  |-------------------------------|
  | 2020-04-21 13:35:59.983 -0400 |
  +-------------------------------+
  +-------------------------------+
  | CURRENT_TIMESTAMP             |   &lt;--- file NOT replaced by 2nd execution!
  |-------------------------------|
  | 2020-04-21 13:36:17.629 -0400 |
  +-------------------------------+
  </code></pre>
  
  <p>[edit to hopefully clarify the problem]</p>
  
  <p>If each execution is supposed to create an hourly file, then each execution ADDS DATA to the hourly file ... so much for an hourly dataset.</p>
  
  <p>I know plenty of workarounds, but this is a specific question about spool. I'd prefer option that changes  the behavior of the spool command. In other systems, I'm used to the file being overwritten and this keeps biting me!</p>