Category "snowflake-cloud-data-platform"

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

How to use SELECT/INSERT statement in snowflake UDF

I have a requirement where I need to create a UDF in snowflake but it has complex Select and Insert statements. But as per the documentation, SELECT statement c

How can i connect between Snowflake and IoT Sitewise to share data?

I am looking for any connector or any other ways that i can connect and get data from snowflake to IoT Sitewise.

partitions_scanned missing from QUERY_HISTORY

I am trying to get from my query history the pct_table_scan as select query_id , (partitions_scanned / nullif(partitions_total,0)) * 100 as pct_table_scan from

Java Stream a Large SQL Query into API CSV File

I am writing a Service that obtains data from large sql query in database (over 100,000 records) and streams into an API CSV File. Is there any java library fun

i have problem connceting snowsql to snowflake its showing error

C:\Users\raxz>snowsql -a dr61159.ap-southeast-1.aws -u raxz Password: 250001 (n/a): Could not connect to Snowflake backend after 0 attempt(s).Aborting If the

Snowflake trial data in wrong format

I am trying to run the Snowflake trial. The file is at s3://snowflake-workshop-lab/citibike-trips Supposed to be CSV but is Parquet. Ideas?

How to parse json in snowflake to get the count based on certain field in json

[ { "type": "ENTITLEMENT", }, { "type": "ENTITLEMENT", }, { "type": "ROLE" }, { "type": "ACCESS_PROFILE" } ] I have a column wi

ODI connection to Snowflake using JDBC driver

I followed all the steps mentioned for ODI to connect to Snowflake and I am able to connect 'without agent' I also 'unset' the SSL/TLS parameter using code belo

Snowflake's `try_to_geography` raises an error instead of returning null

I am trying to run a query in Snowflake to convert a GeoJSON object into Snowflake's baked-in geospatial data types: SELECT id, -- some other columns TRY

Snowflake's `try_to_geography` raises an error instead of returning null

I am trying to run a query in Snowflake to convert a GeoJSON object into Snowflake's baked-in geospatial data types: SELECT id, -- some other columns TRY

Stored Procedure Snowflake - time formatting issue

var get_end_time = "select CURRENT_TIME()"; var time_sql = {sqlText: get_end_time}; var time_create = snowflake.createStatement(time_sql); var time_exec_end = t

Snowflake JDBC database metadata not returning getImportedKeys

I have Java code that extracts metadata from a JDBC connection. One of the calls is to extract the imported keys. The database has the RI created, but is disa

How to manipulate Json nested attributes in a JavaScript UDF in Snowflake

I have to write a JavaScript UDF function in Snowflake that receives a variant as the argument and do some value changes for a few keys. All is good but there's