Monday, April 25, 2022

How-to-generate-log-file-on-Snowflake-connector- SnowSQL

 

SnowSQL

  • What is the Snowflake SnowSQL version?

          > snowsql --version

          > snowsql --bootstrap-version

          > snowsql --versions

  • Is it reproducible with the latest SnowSQL version?
  • Is SnowSQL used interactively or in a batch script?
  • Generate log files:
    • Add -o log_level=DEBUG to the usual command line arguments, or if you prefer to do it in the SnowSQL config file, update log_level=DEBUG:
      • Linux or Mac: ~/.snowsql/config
      • Windows: %USERPROFILE%\.snowsql\config
    • If you're generating DEBUG level logs to troubleshoot a specific issue, you might consider creating a separate logfile while reproducing this issue. This can be done with adding -o log_file, such as:
      • Linux or Mac: snowsql -o log_level=DEBUG -o log_file=/path/to/snowsql_debug.log <rest of the usual arguments>
      • Windows: snowsql.exe -o log_level=DEBUG -o log_file=C:\Temp\snowsql_debug.log <rest of the usual arguments>
  • Collect log files:
    • Linux or Mac: ~/.snowsql/log*
    • Windows: %USERPROFILE%\.snowsql\log*
    • or if using log_file, collect the logfile from the path specified in log_file. E.g. C:\Temp\snowsql_debug.log in the above example.
  • Documentation reference:

No comments:

Post a Comment

Recent Post

Databricks Delta table merge Example

here's some sample code that demonstrates a merge operation on a Delta table using PySpark:   from pyspark.sql import SparkSession # cre...