Skip to content
Home » sql

sql

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… 

Solve TypeError: ‘dict’ object does not support indexing when running SQL queries in Python

I ran into another silly error, for which I wanted to share the solution in order to save you some time. It occurs when trying to run a query using Python’s SQLAlchemy libary. Let’s dive right in. The problem When you’re trying to run a query, either by using Pandas’… 

Using ‘PARTITION BY’ in BigQuery to calculate the share per group

In this blog post we’ll calculate the share of a row per group. There are multiple ways to do this: with aggregate functions and with analytic functions. We’ll go over both and demonstrate how analytic functions are far superior in terms of readability. First, let’s create a table to demonstrate… 

Dataform: Create if incremental table doesn’t exist (JS)

One of Google’s latest acquisitions, ELT data orchestration tool Dataform, supports JavaScript. This is a great way to chain Dataform’s actions. In this blog post we explore how to automatically create a destination table in your data warehouse, before an incremental definition is run. If you are interested in a…