0
votes

(submitting on behalf of a Snowflake User)


I understand that you can configure log files by following this documentation (https://docs.snowflake.net/manuals/user-guide/snowsql-config.html#configuration-options-section) and the following snippet:

| log_bootstrap_file | ~/.snowsql/log_... | SnowSQL bootstrap log file location |

| log_file | ~/.snowsql/log | SnowSQL main log file location

BUT(!) is there a way to save log file of different jobs under different paths?


Any recommendations would be greatly appreciated! THANKS!

1
What do you mean by "different jobs"?Simon D
Asking client for clarification... hope to have something of value soon.Gavin Wilson

1 Answers

0
votes

I would do something like the following, where I add the log file location to the snowsql command and my config file has a config called configName.

snowsql -c configName -o log_file=~/.snowsql/"$(date +'%Y%m%d_%H%M%S')"log

This example uses a pretty-close-to-unique-name for the logfile name, assuming you don't have two processes starting at the same second, this should work. If you need to modify the path (e.g. /tmp/log/uniqueName/logfile.log), you could use OS environment variables in the same fashion, note however you'd likely have to create that folder/directory first.

I hope this helps...Rich