In Snowflake, you can do something akin to an APPLY, but not. That, my friends, is a LATERAL join. According to Snowflake documentation, this type of join “allows an inline view to reference columns from the table expression that precedes the inline view.” Yes, that’s gibberish. Let’s show what you’re doing. To test this out,…… Continue reading Laterally a new move
Tag: Snowflake
Flattening out data in SnowFlake
Sometimes you have to work with different kinds of data in Snowflake – just like in most databases. Today I want to work with some JSON – the same basic premise works for XML, Arrays, and other variants. SELECT * FROM TABLE(FLATTEN(input => parse_json(‘[3089, NULL, 217]’))); So, first, let’s go thru the parse_json portion. Notice…… Continue reading Flattening out data in SnowFlake
Making Baby Tables In SnowFlake
Sometimes, you need to work with tables that have a predefined list of values. You can have these automatically uploaded and refreshed to Snowflake via several means inherent to Snowflake (or any of a variety of methods from PowerShell, R, Python, etc..) But, sometimes, you want a small list of data inherent to a query…… Continue reading Making Baby Tables In SnowFlake
Sound of Silence in Snowflake
One of those functions that can be helpful – in the right circumstances – is SOUNDEX. If you hop into the Wayback Machine with Sherman, Mr. Peabody, and me, I created a blog post about this very subject – found here. https://youtu.be/pm_1L27JGFg In Snowflake, the SOUNDEX function works exactly the same way: For all the…… Continue reading Sound of Silence in Snowflake
Inserting an Insert into Snowflake
Whenever I say the keyword INSERT in conjunction with databases, we – as data developers – automatically think that we’re going to be putting data into a table (or multiple tables with Snowflake – see here). With Snowflake, that isn’t always true. Now, you’re probably saying to yourself “Sherpa has obviously lost his/her mind. Who…… Continue reading Inserting an Insert into Snowflake
Expunging data, the Snowflake way.
Sometimes, in Snowflake as well as in SQL Server, you’re forced to delete data. Hopefully, you’re not deleting from the main table of a database in Production, but that is definitely one way to wake up in the morning. If you’re only deleting from one table, then Snowflake is like SQL Server in the formatting…… Continue reading Expunging data, the Snowflake way.
Insert differently with Snowflake and SQL Server
One of the things that I’ve gotten used to with Snowflake is that it’s just different. Well, today, I’ve got some goodness for y’all – and in a place that you really wouldn’t expect – the INSERT statement. For most of your everyday use, it works exactly as you’d expect. As some would say, it…… Continue reading Insert differently with Snowflake and SQL Server
Somehow I like Snowflake more and more
It’s no secret that I like Snowflake. When I say like, I mean that I like some of the different ways that I can find data within other data. For example, see this post from last time. This time, I want to show why one of the many operators are used over another and what…… Continue reading Somehow I like Snowflake more and more
I like Snowflake More and More
With SQL Server, you’ll find that, quite often, when dealing with strings, you’re almost stuck using the like operator to check if items are “like” another string. I don’t know how many times I’ve done something like the following: SELECT * FROM dbo.TableName WHERE Field LIKE ‘%Name%’; Hopefully, many of you get the gist of…… Continue reading I like Snowflake More and More
SELECT Something New in Snowflake
Sometimes you think you have something down. With years of SQL Server experience, you would think you’d know at least the basics of the SELECT statement no matter the relational database. Well, my friends, you’d be wrong. With Snowflake, we could do many different things that we’re not used to seeing with a SELECT statement.…… Continue reading SELECT Something New in Snowflake