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
12,255
questions
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 ...
0
votes
0
answers
41
views
Converting basic update logic from a table to a view in Snowflake
I'm working on converting something that's currently in a table in snowflake into a view. One of the big issues I've run into is that the code I was provided to build the table uses the SQL UPDATE ...
1
vote
1
answer
22
views
Snowflake query returning false date with conversion
I've a query as below that's converting dates like (20190520,20050511,....) into 19700823.
SELECT NVL(TO_VARCHAR(ALIS.CYCAL_DATE::DATE,'YYYYMMDD'),'00000000')
FROM SCHEMA.VIEW.VIEWNAME_INDE ALIS
...
0
votes
0
answers
29
views
Handle sparse data in Snowflake
I have a loosely structured data(json) incoming from a source landing intno Snowflake stage. The structure of json(# of KV pairs) are not consistent across files i.e. one file can come up with 5 kv ...
0
votes
2
answers
36
views
Snowflake: OBJECT(field TYPE) not supported
I'm trying to create the following table in Snowflake:
CREATE OR ALTER TABLE TEST_TABLE (
a OBJECT(b VARCHAR(100))
);
and I get the following error:
Unsupported data type 'OBJECT(b VARCHAR(100))'....
0
votes
0
answers
42
views
Is there a way to optimize this query in Tsql?
WITH CTE AS
(
WITH flattened_data AS
(
SELECT
DISTINCT
MAX(CASE WHEN (entry.value:Id::STRING)='123' THEN entry.value:Answer:text::STRING END) AS VD,
MAX(CASE WHEN (...
0
votes
0
answers
54
views
401 Unauthorized Error with dbt Models on Snowflake After ADF Ingestion
Recently, we implemented a solution where data is ingested into Snowflake using Azure Data Factory (ADF). After ingestion, the ADF data pipeline triggers dbt models using programmatic invocations. We ...
0
votes
0
answers
39
views
Issues with SQLAlchemy
I'm trying to run the following code (some of the stuff I blind, like the passwords)to get some Snowflake data into a Jupyter notebook:
import math as math
import numpy as np;
import pandas as pd;
...
0
votes
0
answers
45
views
creating a data dictionary via snowflake query?
I figured I could easily create a basic data dictionary of the schema my team is working out of. I currently have this:
WITH column_metadata AS (
SELECT
TABLE_SCHEMA,
TABLE_NAME,
...
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 = &...
1
vote
1
answer
41
views
How to create a dynamic pivot table in Snowflake?
I'm trying to create a pivot table in Snowflake where the columns are dynamic based on the data. For example, see the following table:
CREATE OR REPLACE TABLE sales_data (
Category VARCHAR,
...