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.

Find answers to technical questions related to Snowflake including information about its SQL language, connectors, administration, user interface, and ecosystem. For other issues, including potential bugs and requests for password changes, contact Snowflake Support at https://community.snowflake.com/.

Related Tags

Additional resources:

10701 questions
41
votes
5 answers

"Variables may not be used here" during terraform init

I am using Terraform snowflake plugins. I want to use ${terraform.workspace} variable in terraform scope. terraform { required_providers { snowflake = { source = "chanzuckerberg/snowflake" version = "0.20.0" } } backend…
Yohei Onishi
  • 1,362
  • 1
  • 19
  • 42
25
votes
7 answers

Split a large json file into multiple smaller files

I have a large JSON file, about 5 million records and a file size of about 32GB, that I need to get loaded into our Snowflake Data Warehouse. I need to get this file broken up into chunks of about 200k records (about 1.25GB) per file. I'd like to do…
21
votes
12 answers

Does Snowflake support indexes?

In the Snowflake documentation, I could not find a reference to using Indexes. Does Snowflake support Indexes and, if not, what is the alternative approach to performance tuning when using Snowflake?
Koustav Ponda
  • 219
  • 1
  • 2
  • 3
21
votes
3 answers

How can I populate a pandas DataFrame with the result of a Snowflake sql query?

Using the Python Connector I can query Snowflake: import snowflake.connector # Gets the version ctx = snowflake.connector.connect( user=USER, password=PASSWORD, account=ACCOUNT, authenticator='https://XXXX.okta.com', …
RubenLaguna
  • 21,435
  • 13
  • 113
  • 151
20
votes
7 answers

Snowflake JDBC driver internal error: Fail to retrieve row count for first arrow chunk: null -- only occurs on SELECT statements

I have successfully established the JDBC connection and can successfully execute statements like "use warehouse ...". When I try to run any SELECT statement I get the following error: net.snowflake.client.jdbc.SnowflakeSQLLoggedException: JDBC…
Sara Feraca
  • 201
  • 1
  • 2
  • 3
18
votes
3 answers

NOT LIKE ANY query in Snowflake

I am trying to run the following query in Snowflake: SELECT * FROM chapters WHERE title NOT LIKE ANY ('Summary%', 'Appendix%') but it errors out. I know Snowflake support LIKE ANY query syntax. But I am not sure why my query is not working.
Saqib Ali
  • 3,953
  • 10
  • 55
  • 100
18
votes
3 answers

SELECT INTO syntax for Snowflake Datawarehouse

I believe there's an SELECT INTO-like syntax in Snowflake, but I am unable to find documentation or examples to use it. CREATE TABLE raw_data ( Timestamp TIMESTAMP NOT NULL, Date DATE NOT NULL, UserID STRING, Address STRING, …
Kirk Broadhurst
  • 27,836
  • 16
  • 104
  • 169
17
votes
6 answers

NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:snowflake

I've installed all the necessary packages: pip install --upgrade snowflake-sqlalchemy I am running this test code from the snowflake docs: from sqlalchemy import create_engine engine = create_engine( …
Hana
  • 1,330
  • 4
  • 23
  • 38
16
votes
11 answers

How to delete duplicate records in Snowflake database table

How can I delete the duplicate records from a Snowflake table? ID Name 1 Apple 1 Apple 2 Apple 3 Orange 3 Orange Result should be: ID Name 1 Apple 2 Apple 3 Orange
Viki
  • 171
  • 1
  • 1
  • 4
15
votes
3 answers

Snowflake as backend for high demand API

My team and I have been using Snowflake daily for the past eight months to transform/enrich our data (with DBT) and make it available in other tools. While the platform seems great for heavy/long running queries on large datasets and powering…
Lucas Lima
  • 193
  • 1
  • 6
15
votes
7 answers

generate_series() equivalent in snowflake

I'm trying to find the snowflake equivalent of generate_series() (the PostgreSQL syntax). SELECT generate_series(timestamp '2017-11-01', CURRENT_DATE, '1 day')
Tarik
  • 167
  • 1
  • 2
  • 6
15
votes
4 answers

AWS Redshift vs Snowflake use cases

I was wondering if anyone has used both AWS Redshift and Snowflake and use cases where one is better . I have used Redshift but recently someone suggested Snowflake as a good alternative . My use case is basically retail marketing data that will be…
14
votes
1 answer

:qMacOS: Error: Failed to initialize log. No logging is enabled: [Errno 13] Permission denied: '/Users/snowsql_rt.log_bootstrap'

I have downloaded and installed SnowSQL onto my Mac. After entering the following command snowsql -a zx12334 -u someone I am getting the following error Failed to initialize log. No logging is enabled: [Errno 13] Permission denied:…
CarlosX2X
  • 193
  • 1
  • 1
  • 9
14
votes
6 answers

How to restrict duplicate record to insert into table in snowflake

I have created below table with primary key in snowflake and whenever i am trying to insert data into this table, it's allow duplicate records also. How to restrict duplicate id ? create table tab11(id int primary key not null,grade…
Neeraj Yadav
  • 201
  • 1
  • 4
  • 8
14
votes
2 answers

Lateral flatten two columns without repetition in snowflake

I have a query that groups by a two variables to get a total of another. In order to maintain my table structure for later computations I listagg() two other variables to save for the next stage of the query. However, when I attempt to do two later…
moku
  • 4,099
  • 5
  • 30
  • 52
1
2 3
99 100