Category "snowflake-cloud-data-platform"

Snowflake query performance with UNION

We have a bunch of queries where we UNION data from 3 tables at query time ( we get data from 3 sources ) . I was wondering if query performance would be any be

Dealing with unstructured data in snowflake

I have unstructured data in a column in the format [{ "M": { "accountNumber": { "S": "1000022" }, "orgUrns": { "L": [{ "S": "c

why empty values are allowed but not null values in composite primary keys

I am working on an App connecting to the Snowflake database. I stumbled upon an issue while loading CSV files. I was using the NULL_IF condition in copy command

jdbc template batch update with snowflake database is very slow

I have a spring boot application that connects to the Snowflake Database and uploads records (approx 50 columns of different data types). I am using JdbcTemplat

Snowflake - OBJECT data type

Snowflake OBJECT data type provides support for storing semi structure data (Primarily key value pairs), for example, if below is my dataset (with Parameter bei

How to parse this json in snowflake

{ "segmentId": "b204c220-ea8d-4cf4-b579-30eb59a1a2a4", "diffFields": [ { "fieldName": "name", "valueBefore": null, "valueAfter": "new-

SQL Join is Returning Multiple Rows

Below is a Snowflake query that is trying to get the serial number that's associated with each account name (ACCT_NAME), account ID (ACCT_ID), SKU ID (SKU_ID_p2

How to create the file format in Snowflake?

I have below sample csv data with column delimiter as "|" and row delimiter is "|\n". I am receiving below error. How can I create the File Format? Key|DimType|

OSError(28, 'No space left on device') error in Snowflake while loading big file

I am getting error OSError(28, 'No space left on device') while copying 15 GB zip file into snowflake AWS, via snowsql. Can someone help me to understand this

How to convert a string into a url-friendly string in Snowflake SQL?

I am working in Snowflake and have a column pets that I'm trying to put into a url friendly format so they can be concatenated to links within Metabase. Example

Snowflake CONCAT strings with DISTINCT values

I am doing a merge where a string exists in my target table. To this I want to concat a new delta value which is a ; separated string list in my WHEN MATCHED ..

Migrating T-SQL script to Snowflake - error invalid identifier

I am currently trying to migrate a T-SQL script to Snowflake. This is the T-SQL script: SELECT * —- a bunch of stuff FROM TABLE_DATE D LEFT JOIN

Best way to update/delete records in db based on Apache Kafka topic message

I have an application publishing messages on a Kafka Topic. I've used Confluent's Snow Sync to synchronize the topic with a Snowflake table so when I publish a

rank function using order by timestamp_tz(9) in snowflake is not working properly

snowflake rank function order by same ROW_MODIFIED_TMST function is generating unique numbers. for example: Table1 Column1 ROW_MODIFIED_TMST

Insert into snowflake table from snowflake stream

I have a table in snowflake Table1 and I created a stream on Table2. Now I want to check that if there is data in stream based on changes in Table2, then I want

snowsql - tls_process_server_certificate

New to snowsql. Installed snowsql and ran the command snowsql -a <account_name> -u <user_name> and that failed with below error: 2022-04-28 18:50:5

Snowflake View too slow to query with dynamic pivot

I have created a stored procedure in Snowflake to dynamically pivot the table and create a view from JSON data. The query creates a view with 370 columns as I d

Date scaffolding with multiple different date measures?

I want to show the amount of people in each contract status historically. I have a list of every contract's start date, suspension dates, expiration date, and t

Snowflake parsing JSON and add aggrate column

have a json field [ {'id':'1', 'name':'test1', 'address':'123 Main St'}, {'id':'1', 'name':'test2', 'address':'1404 Burke St'} ] This is how the record

Pythonic way to write OR SQL condition to extract information schema data from Snowflake

I am connecting to Snowflake using python (Below code). As you can see I am trying to get Row Count,Date table was created and altered from Information Schema t