Skip to content
Home » How to solve “We were unable to create or write to the ../snowsql_rt.log_bootstrap” in SnowSQL

How to solve “We were unable to create or write to the ../snowsql_rt.log_bootstrap” in SnowSQL

As a data scientist, I usually get a data warehouse to work with. The data’s there and I don’t have to worry about the architecture. However, now and then, I need to get my hands dirty. Lastly, I needed SnowSQL and I couldn’t get it to work, due to an annoying warning message. Let’s dive in.

After installing SnowSQL on a Windows machine, I wanted to run it with my Windows terminal (however, the traditional command prompt didn’t work either), and was presented with the following error.

We were unable to create or write to the ../snowsql_rt.log_bootstrap.

I was able to bypass the warning when I ran the command prompt in admin mode, but that didn’t seem right. So I continued my quest for a proper solution.

First, I found what’s causing the problem. I discovered that the snowsql_rt file is where SnowSQL writes (some of) its logs. And the default directory is not writeable, unless you have administrator rights. Since the path is ../, this means SnowSQL is trying to create the file in the Program Files folder. That’s not supposed to happen.

So, I figured you need to change the default directory.

In the following directory, you’ll find SnowSQL’s config file. Open it with a text editor like Notepad++.

C:\Users\<YOUR_USER>\.snowsql

In this file, you’ll find the following lines.

# main log file location. The file includes the log from SnowSQL main
# executable.
log_file = ../snowsql_rt.log

# bootstrap log file location. The file includes the log from SnowSQL bootstrap
# executable.
# log_bootstrap_file = ~/.snowsql/log_bootstrap

It’s rather weird that fhe first key-value seems to contain a wrong path, but the key-value which throws an error appears to be correct. However, when you solve the log_file key, by correcting it, the error goes away. For example, this will put the logs in the .snowsql directory.

log_file = ~/.snowsql/snowsql_rt.log

So, now you can start using SnowSQL!

15 thoughts on “How to solve “We were unable to create or write to the ../snowsql_rt.log_bootstrap” in SnowSQL”

Leave a Reply

Your email address will not be published. Required fields are marked *