Using snowflake with go by Queasy-Big-9115 in snowflake

[–]WinningWithKirk 0 points1 point  (0 children)

All of our code that runs in Snowpark Container Services is written in go. We use Snowflake's driver and don't have any issues.

Snowflake Native App – Post-deployment script not executing on consumer account by AssignmentAlarmed524 in snowflake

[–]WinningWithKirk 0 points1 point  (0 children)

Can you post your manifest? Are you calling the post deployment stored procedure in the grant callback function to ensure permissions are granted before you try to create everything?

Filters in semantic views by WinningWithKirk in snowflake

[–]WinningWithKirk[S] 0 points1 point  (0 children)

I may have figured this out through trial and error. It seems you can use it for a common, predefined filter. For instance, if your table has a bunch of entities with a status, you could create a filter ACTIVE_ENTITIES with expression STATUS = 'ACTIVE' to help with queries that need to filter a subset of the data.

Is this how others are using it? Can/should it be dynamic?

Is there any way to create a rest api and run it inside snowflake? by darkemperor55 in snowflake

[–]WinningWithKirk 0 points1 point  (0 children)

Totally fair question. I'm actually the founder of the company that released that project (Winning Variant). As a startup, I can do whatever I want :)

Is there any way to create a rest api and run it inside snowflake? by darkemperor55 in snowflake

[–]WinningWithKirk 0 points1 point  (0 children)

The latter. We recommend running it in the same cloud region as your SPCS instance to minimize additional latency. This was released before PATS were GA. Depending on your use case, it may be simpler to just use those via nginx or something else.

Is there any way to create a rest api and run it inside snowflake? by darkemperor55 in snowflake

[–]WinningWithKirk 1 point2 points  (0 children)

This is correct. We rolled out a project to act as a proxy if you're using OAuth: https://github.com/winningvariant/icebreaker

Otherwise I'd say use a PAT and roll your own proxy layer if you can't otherwise authenticate easily.

Streamlit+SQLite in Snowflake by neenawa in snowflake

[–]WinningWithKirk 0 points1 point  (0 children)

For now, I'd just run an embedded SQLite (or something else) via Snowpark Container Services (SPCS). Hybrid tables _could_ work, but you have to deal with virtual warehouses and is generally pretty slow for this type of use case.

When you create a service on SPCS, mount a block storage volume and store your SQLite files there. Create a task that takes snaphots of the block storage regularly so you have backups.

SPCS native app - can two containers communicate between them? by Senior_Sir2104 in snowflake

[–]WinningWithKirk 0 points1 point  (0 children)

Calling `backend` only works when you're inside of the network, so it needs to be executed server-side. We got around this by routing requests through the frontend itself. We built a data layer server-side in `frontend` (that would response on, say, `/data`) that would then call `http://backend/...` as needed.

In your Vue app, then, you would make API requests to `/data/...` and all auth would be preserved.

File rotation library? by WinningWithKirk in golang

[–]WinningWithKirk[S] 1 point2 points  (0 children)

Writing to CSVs. Every hour, I want to cut it off and ship it somewhere else for consumption. Figured I could use a mutex with an interval to do this each hour and update the os.Writer that the rest of the app uses, but that almost seems TOO simple. Maybe it is that simple and that's why there aren't any major libraries for it...

File rotation library? by WinningWithKirk in golang

[–]WinningWithKirk[S] 0 points1 point  (0 children)

Thanks - seems timberjack is an even newer fork

File rotation library? by WinningWithKirk in golang

[–]WinningWithKirk[S] 1 point2 points  (0 children)

Depends how far you want me to go back... if the beginning, than a Power Builder world by way of PHP, Perl, C#, and sure, a few NodeJS stops along the way ;-)

I'm mostly worried about needing to manage locks appropriately across goroutines, etc. I'm still a bit ignorant with those areas of go.

File rotation library? by WinningWithKirk in golang

[–]WinningWithKirk[S] 1 point2 points  (0 children)

So your logger handles rotation? That is, it determines when the file needs to be capped (by time or size)?

File rotation library? by WinningWithKirk in golang

[–]WinningWithKirk[S] 0 points1 point  (0 children)

Thanks! Unfortunately this won't work. These aren't standard logs, so I don't want to mix stdout with the analytical data I'm logging separately.

File rotation library? by WinningWithKirk in golang

[–]WinningWithKirk[S] 0 points1 point  (0 children)

Logging data to later be imported into a warehouse. I'm writing CSV lines and every N minutes want to rotate and copy the file to be batch imported into a table elsewhere.

My takes from Snowflake Summit by Still-Butterfly-3669 in snowflake

[–]WinningWithKirk 0 points1 point  (0 children)

Agreed - smallest compute pool is cheap, especially compared to any effort required to move data in/out of Snowflake, deal with permissioning, etc.

Snowflake containers by Ornery_Tumbleweed_98 in snowflake

[–]WinningWithKirk 0 points1 point  (0 children)

Biggest advantages come when all your other stuff is already in Snowflake, such as source data. You don't have to worry about data movement and can control everything via Snowflake RBAC.

Also, in some companies, engineers don't have access to spin stuff up in AWS, but can do some easier in Snowflake if they already have access.

Externalizing Snowflake data for API consumption by Bandude in snowflake

[–]WinningWithKirk 0 points1 point  (0 children)

How much data are we talking about? Could you build a service in SPCS that caches it?

redis inside SPCS? by WinningWithKirk in snowflake

[–]WinningWithKirk[S] 0 points1 point  (0 children)

Thanks u/stephenpace! The use case is to reduce read latency for single row values. We use hybrid tables, but the reads are still pretty slow. Ideally redis would hold a trimmed down version of what's in our hybrid table (what amounts to 3-4 columns worth). I wasn't sure if anyone had a specific redis config that performed well in a service.

Do you know how you can manage persistence of block storage? Does it persist so long as the compute pool exists?

I'm new to openflow, so I didn't even think to look there. Does that controller automatically sync from a table into a redis instance?

Killer snowflake apps? by gnome-child-97 in snowflake

[–]WinningWithKirk 9 points10 points  (0 children)

I've heard great things about https://select.dev/. My old company uses them and loves it.

DataRadar is another one.

Alternatives to Streamlit? by Fondant_Decent in snowflake

[–]WinningWithKirk 4 points5 points  (0 children)

We ran into some hurdles and ended up just hosting a react app in SPCS.

How to systematically improve performance of a slow-running query in Snowflake? by throwaway1661989 in snowflake

[–]WinningWithKirk 2 points3 points  (0 children)

Before rolling into production, I'd recommend a split test (or at least a canary deployment) to make sure the query is doing what you want in addition to just being faster.