All Questions
Tagged with snowflake-cloud-data-platform snowflake-schema
804
questions
1
vote
1
answer
30
views
Generating a single result set from multiple tables dynamically in Snowflake
I am trying to get a result set with 2 columns from snowflake using dynamic SQL, this is read from the INFORMATION_SCHEMA_TABLES metadata.
I simply want the (TABLE_NAME, PUB_DATE) columns for all ...
-1
votes
1
answer
25
views
how to get history of the snowflake table and how to get what is the version of the snowflake table and operation of the snowflake table as well
select max(timestamp) from (DESCRIBE HISTORY <tablename> ) where operation = 'MERGE'
DESCRIBE HISTORY <tablename> ).orderBy(col("version").desc).first.getLong(0)
I need to ...
0
votes
0
answers
18
views
Limit a user/role to not see the list of other users through snow sight - Users and Role section
Is there a way we can limit a user or a role to not see the list of other users through snow sight - Users and Role section.
Also, is there a way we can limit user to not have Public Role and only ...
0
votes
0
answers
37
views
Iterating through tables/columns in snowflake schema to find text value only working sometimes?
I am working within a snowflake DB schema that has about 200 tables and I need to figure out which table has a specific row-level value within a column. Looking for any table that contains a value = &...
0
votes
0
answers
22
views
unable to connect flyway to snowflake using user and key pair authentication
I'm trying to migrate DB objects(tables, views, procedures, etc) from dev to other regions using flyway. I'm currently using flyway 10.15.2 version and trying to connect to snowflake via key pair ...
-1
votes
1
answer
58
views
Group records on multiple columns in snowflake
Need to group records from following below sample input data on based on state,card number,card type, origin, method of payment, sales amount so that all records belonging to same group will be ...
0
votes
1
answer
42
views
Dynamically lateral flatten in Snowflake
{
"explosives_UG":{
"isCritical": false,
"value": "N/A"
},
"explosivesUG": {
"comment": "Test 619 313",
"...
0
votes
1
answer
34
views
Snowflake - Lateral flatten
{
"area": {
"id": "TEST1"
"value": "TEST1"
},
{ "testcom": {
"conditions": [
{
"assignedto&...
0
votes
0
answers
49
views
Snowflake Unsupported subquery type cannot be evaluated in UDF
I am trying to create a function that will take an h3id as input and returns the zip5 which the h3id belongs to, In order to do so I have created this UDF:
CREATE FUNCTION get_zip_from_h3(h3_id ...
0
votes
2
answers
88
views
how to add Interval time in snowflake using a parameter
We have a use case where user will provide starttime, endtime, and Interval as parameters. and we need to pass these parameters to view logic where we have business logic, But the Interval function is ...
0
votes
0
answers
44
views
Issue in connecting to snowflake when implementing SchemChange CICD approach
I'm trying to implement the schemachnage cicd approach using github workflows to migrate to different environments (test/prd).
Below is my yaml file code. But it is not working as intended? I checked ...
0
votes
1
answer
125
views
How to programmatically select a specific schema in Snowpark within a Snowsight Python worksheet?
While writing the Snowpark code in a Snowsight Python worksheet, how can I select a specific schema? I know I can manually select it using the UI, but I want to select it programmatically.
import ...
0
votes
2
answers
203
views
Snowflake sequence issue
I'm trying to create a sequence into Snowflake for a table ID, I need it to increase 1 by 1 (1,2,3,4,...), how ever when I create it and try sequence.nextval it increases (1,101,201,301...) and I don'...
2
votes
1
answer
148
views
Restore the data from the table recreated multiple times in snowflake
I had an issue when someone from my team recreated the table more than once using CREATE OR REPLACE as there were some new fields that had to be added. However, instead of adding a column using ALTER ...
0
votes
1
answer
39
views
how to test if row values in source when taken as columns in target
I have a source table like below,
ID
Column
value
1
apple
10
1
apple
8
1
banana
9
1
banana
12
I have a target table like below,
ID
apple
banana
1
10
9
1
8
12
How do I test/verify this using ...