Questions tagged [snowflake]

Snowflake is a cloud-based data warehouse

Filter by
Sorted by
Tagged with
3
votes
1answer
423 views

How to do hierarchical queries without CTE tables or recusive queries in Snowflake? (parent, child relationships)

I have several tables in Postgres that we are migrating to Snowflake. Some of these table are hierarchical (a foreign key point to the same table), normally to query this data I use CTE tables and/or ...
2
votes
2answers
80 views

Getting timepart from timestamp

Hello my little snowflakes, how can I isolate the correct time part of a timestamp? SELECT CURRENT_TIMESTAMP() ...
1
vote
1answer
3k views

How can you insert data into a ARRAY column on a Snowflake table using SQL?

I am having difficultly finding documentation on how to insert data into an ARRAY column type using SQL on a Snowflake table. Snowflake Documentation: https://docs.snowflake.net/manuals/sql-reference/...
0
votes
2answers
52 views

Window function in Update statement

Is there a work around to use window functions in update statement You can populate sample/original table using the code Create table #table( key1 Char(5), date1 Date, date2 Date ); Insert into #...
0
votes
1answer
15 views

Merge multiple rows in table setting one column based on value in rows

I have some data that looks something like this: key B 1 true 1 false 2 false 2 false And I want to roll it up so that if column B has two false values then the resulting value for B is ...
0
votes
1answer
30 views

ETL from non public database to a public one

I have a database that is in a private network. The database is not publicly accessible (you have to be on the local network to access it). We would like to use an ETL tool like FiveTran to export the ...
0
votes
1answer
31 views

Repeatedly emptying a table, keeping the table itself [closed]

I have been using "delete from table_xyz" to delete everything in the table. Would it be better to instead use truncate? What difference does it make?
-1
votes
1answer
404 views

Use Sha vs md5 or Hash in Snowflake-db

Let me preface by saying that I am not using this for storing passwords or any other sensitive info -- I simply want a row-level sha/hash that I can use later or to check for unique records. My tables ...
-2
votes
1answer
36 views

SQL Case statement

Need SQL query help for the logic as below If at least 1 user under an account is "Enabled" then status = 'Active' If all users under an account are not "Enabled" then status = 'Cancelled' else '...