Questions tagged [snowflake-cloud-data-platform]
Snowflake Cloud Data Platform has a multi-cluster, shared architecture that provides a single location for structured and semi-structured data that can be queried using ANSI SQL. Snowflake is a cloud-agnostic platform with very large scale that supports many different workloads: data warehousing and analytics, data lake, data engineering, secure data sharing, data applications, and data science.
snowflake-cloud-data-platform
11,711
questions
0
votes
0
answers
11
views
snowflake cli "snow connection list" command does not show any connection after connection got added successfully
I am trying to setup SNOW CLI in my system . After successful installation I am able to add a connection to config.toml via snow connection add command however on executing snow connection list no ...
1
vote
0
answers
18
views
Snowflake equivalent for Quotename() in SQL Server?
What would be the equivalent function for quotename() ?
Below is part of a stored procedure:
declare @numcols nvarchar(max)
select @numcols = string_agg(quotename(NAME), ', ') within group (order by ...
0
votes
2
answers
32
views
truncate snowflake division output scale without rounding off
I have a select query having division a/b
The output value is having very large scale .
The output I'm getting is
0.020011991559
I'm expecting the output below. basically 6 digits in scale
0.020011
...
3
votes
2
answers
29
views
Rows not getting added to Snowflake table using Python connector
I am trying to create and load a table in Snowflake using Python. The data is in a pandas data frame. Below is the code I'm using. The table gets created, but it has 0 rows and there's no error ...
0
votes
1
answer
20
views
Snowpark- Can load file from sftp and orcale into snowflake table using snowpark?
I am checking for a solution to load file from sftp server into snowflake table using snowpark -snowflake notebook
is there any direct option?
0
votes
1
answer
17
views
Is there any cost which snowflake charges to provider account to host snowflke native app to snowflake market place?
I am working on creating a snowflake native app using snowpark container services and want to host that app on snowflake marketplace, will snowflake going to charge me anything to host my app on ...
0
votes
1
answer
39
views
Restructuring actions table into a daily snapshot view
Assuming the default status is always "Released" and given a table that contains history of actions taken:
I'd like to have this to be expanded to a daily snapshot view (last month only) ...
1
vote
0
answers
71
views
Apply large number of decision tree rules to SQL data
I want to apply rules that I've created from modelling on data using a decision tree to unseen data. I've parsed the rules to get a CASE WHEN statement like so:
CASE
WHEN variable_1 = "Value1&...
0
votes
1
answer
31
views
I'm looking for a SQL statement to copy all details from Product A to Product B
I have Table_P that has columns Product, region, salesperson, production date, end date. (There are other columns, but those fields don't matter to me). Product_X has 6 rows: 6 regions, 3 different ...
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 ...
0
votes
0
answers
47
views
How to send data from consumer snowflake account to provider snowflake account
I am a new beginner to Snowflake, working on building a Snowflake native app. Forgive me if I mentioned anything wrong. My question is how can I send the data other than logs from the consumer ...
0
votes
1
answer
36
views
Snowflake - Task graph
Task1 has more than one root task a, b. Both the root tasks are suspended and they don't have predecessors. How to enable the root tasks? Can you please give the command?
1
vote
1
answer
44
views
Snowflake unsupported subquery type for UDTF
In Snowflake, I'm trying to save a large amount of code size and maintenance by creating a UDTF to show flags for each row v based on presence of rows in x or y meeting some pattern.
The error I get ...
0
votes
0
answers
19
views
How to use downloaded tokenizers in Snowflake UDF
How would you create a snowflake UDF using autotokenizer for example:
I downloaded a tokenizer as follows and then uploaded to Snowflake stage:
from transformers import AutoTokenizer
tokenizer = ...
0
votes
0
answers
48
views
stream select taking too long
I have to final tables, table_1 and table_2, first one with 6.4B rows and second one with 6.3B rows. None of this tables are clustered
On top of this tables, each one have a stream, standard ones, ...
0
votes
1
answer
33
views
Python logger in a Snowpark Stored Procedure?
I'm trying to add a Python logger to my Snowpark Python stored procedure.
The documentation says that I must create an Event Table, and that Event Tables must be associated with an account, and that ...
0
votes
1
answer
84
views
250001: Could not connect to Snowflake backend after 2 attempt(s).Aborting
I am trying to connect to snowflake using sql database and snowflake url but I am getting "Could not connect error".
This is the code that I am using:
from langchain import OpenAI, ...
0
votes
0
answers
33
views
GitHub Actions-Snowflake connection now working
I am running below workflow in GitHub Actions:
name: ohfa
# Triggers the action based on branch and path.
on:
push:
branches:
- main
paths:
- 'dbscripts/**'
...
0
votes
0
answers
11
views
Snowflake Notebook- How to run notebook parllalley
I am trying to run snowflake notebook paralley using python concurrent process- ThreadPoolExecutor
However the execution failing
from concurrent.futures import ThreadPoolExecutor, as_completed
from ...
-1
votes
0
answers
16
views
Load data into snowflake using informatica power center
Is it possible to load data from oracle database to snowflake using informatica on premise powercenter
ETL tool?
I tried using Informatica cloud but wanted to try using informatica power center ,can ...
0
votes
2
answers
51
views
DBT Duplicate row detected during DML action - Snowflake
Creating an incremental model using the MERGE strategy with a unique key. The unique key to merge on is a surrogate key of columns from the table.
When I run this incremental model I get the error: ...
0
votes
0
answers
19
views
Snowpark Procedure Async SQL Execution
I am trying to run a stored procedure in Snowflake written in Snowpark.
Wherein based on a list of tables I am running some SQL for each table.
I am trying to use the async feature to make the sql's ...
0
votes
1
answer
17
views
How to fetch and view query profile from query_id in Snowflake?
Hi Snowflake Experts/Developers/Data Engineers, I want to view the query profile of a query_id.
Is it possible to view query profile from query_id?
If so how?
If its not possible:
is it possible to ...
0
votes
0
answers
33
views
Kafka Connect to Snowflake connection via JDBC error
I've been trying to send data from Kafka to Snowflake using the JDBC driver with Kafka Connect.
Some details about the environment:
Kafka is running in a Cloudera private cluster (Base 7.1.9).
The ...
0
votes
1
answer
61
views
Connect to Snowflake using Azure Data Factory
I am trying to move data from ADLS Gen2 into Snowflake using ADF.
The linked service connection is getting timed out with the below error-
I have entered the warehouse, database , username, password ...
0
votes
0
answers
35
views
Snowflake Notebook- how to achieve parallelism?
As i know that when executing snowflake notebook through its scheduler, it execute each cell one by one as sequential model.
however i want to paralyze the process where all cell - suppose i have 3 ...
0
votes
1
answer
29
views
Sharing data across virtual environments in Python
I am trying to consolidate data from several different sources into a Tableau .hyper file using Pantab. One of my sources is Snowflake. The problem is that Pantab and Snowflake require non-...
1
vote
1
answer
31
views
Snowflake Native app with container service, grant imported privilege on Snowflake DB
How can a snowflake native application built with container services request or grant imported privilege on Snowflake DB?
According to Snowflake Documentation, the grant can only be added through SQL ...
1
vote
1
answer
25
views
SELECT doing different operations on multiple columns with structured data
I’m working with a Snowflake table where each row contains structured data in two columns. Here’s an example of the table with 3 rows:
| id | data_1 | data_2 |
|----------------...
0
votes
0
answers
39
views
Session.sql() missing 1 required positional argument: 'query' : Snowflake
I have an error with this code:
# The Snowpark package is required for Python Worksheets.
# You can add more packages by selecting them using the Packages control and then importing them.
import ...
0
votes
1
answer
37
views
Snowflake SQL. Select column value if 1st 5 characters are numeric and within a Numeric Range
I have a column named ProcedureCode VARCHAR(16777216) in a Table named ProcedureCode.
It has values like '12345,46H', 'A4715,12W', '98765', '99200' etc.
From that Table, I need to pull only rows where ...
1
vote
1
answer
61
views
Create a Sql Statement IN DBT macro and use the query in the dbt model
my_macro.sql
{macro my_macro(value)}
{% set query %}
select A from value
{{ return(query) }}
{% endset %}
{% endmacro %}
model.sql
select * from B
where A in ({{ my_macro(value) }}
when i ...
0
votes
1
answer
18
views
Snowflake - reference variable as part of column name
I am new to Snowflake and trying to use a set variable to call a column name. Here's what I'm currently trying:
set macro = 'Aut_24';
Select *
from my_data1 a
left join mydata2 b on a.id = b.id
where ...
0
votes
0
answers
16
views
Cannot read variant data in Snowflake from an entire file
I have an issue in that I am trying to create an external table on files that contain string data (with no extension). The issue is, the files are in this format
s3://bucket_name/file1/date1/time1/...
-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
1
answer
48
views
Snowflake clustering -- should inserts be ordered?
Long story short. When you cluster a snowflake table it physically orders it.
Additional inserts are not 'organized/ clustered' into the table, unless you specify to re-cluster/ auto-recluster.
...
0
votes
2
answers
67
views
Dynamic inputs to Date calendar CTE in Snowflake SQL
In Snowflake, how can I declare variables to make the this CTE calendar table dynamic?
The below works if I hardcode the start_date and day_count params, but I'd like to make it more dynamic.
SET '...
1
vote
0
answers
26
views
Error parsing CSV File when copying Data to Snowflake after July 3rd Incident
I am encountering an error while trying to copy a CSV file into Snowflake from an S3 bucket. This process was functioning correctly until an incident occurred in Snowflake on July 3rd. The error ...
0
votes
1
answer
36
views
How to PIVOT data in snowflake by using ANY without having quotes for 'Column_Names'
How to PIVOT data in snowflake by using ANY without having quotes for 'Column_Names'.
CREATE OR REPLACE TEMPORARY TABLE quarterly_sales(
empid INT,
amount INT,
quarter TEXT)
AS SELECT * FROM ...
0
votes
1
answer
45
views
How to Create a table with spaces in column name
I am creating table in Snowflake.
The column name ‘Full Name’ must have a space in the middle. When I put it in double quotes it automatically put the underscore instead of space.
What is the syntax ...
1
vote
3
answers
43
views
Retain Numeric Precision Using OBJECT_CONSTRUCT
I have a currency value in a table that I want to include in an OBJECT. The problem is that it looks like Snowflake drops the 2 decimal place precision I want to keep when converting to an OBJECT.
...
0
votes
0
answers
25
views
Masking Policies & dynamic tables in snowflake
I'm working with Dynamic Tables in Snowflake and trying to apply masking policies to hide sensitive data. However, when I create the dynamic table, I get the following error:
The masking policies are ...
0
votes
1
answer
61
views
Dynamic SQL and cursor iteration in Snowflake
I've been sitting all weekend, trying to figure out the implementation of cursor iterations in Snowflake procedure blocks.
The goal is to create a dynamic procedure that when called checks all ...
0
votes
1
answer
43
views
Left join later flatten works not like left join, but the same as inner join
With this data:
create or replace table test_json as
select
parse_json('{
"include": [
"x",
"y",
"z"
...
0
votes
0
answers
36
views
Python code to connect Snowflake showing ERROR at line "password=os.environ['PRIVATE_KEY_PASSPHRASE'].encode() "
I am trying to connect to snowflake using RSA but getting below error, I have tried with working code from online but still same error. I am not sure if I missed anything.
Error Message:
C:/Users/...
0
votes
0
answers
43
views
Is it possible to orchestrate snowflake Notebook Job?
I have 3 note book created for different data operation . I want to orchestrate the notebook execution as per below flow
Execute Notebook 1
Execute Notebook2
Execute Notebook3
Based on certain flag in ...
0
votes
1
answer
30
views
Snowflake COPY INTO Table from Multiple Stage folders files
I am new to Snowflake and I have searched this in Stackoverflow but I couldn't find a solution yet.
I'd like to have this import from multiple folders
copy into WWD.PUBLIC.July2
from @my_s3_stage/2024-...
0
votes
1
answer
36
views
Combine parent id and all child ids in an array in a single row using recursive cte
I have a table pr with two columns:
stg source id, parent id
125, 124
126, 125
127, 125
128, 127
what I want a final result as:
parent id, stg_source_ids
124, [125, 126, 127, 128]
as my final row ...
0
votes
1
answer
31
views
How can i find out records from a column in a table in Snowflake which does not have any alphabets as well any number?
I have a table and within that in a specific column, i need to find out the records which are having characters anything except an alphabets or numbers.
I tried using regex as
'[^A-Za-z0-9 ]'
Am i ...