For questions regarding programming in Snowpark Python or Scala APIs
Questions tagged [snowpark]
41 questions
1
vote
2 answers
Snowflake Snowpark Python - Stored Procedure
I utilized the Snowpark Python (private preview) to do some data engineering tasks (transform the data from a raw state to a clean state). How do I upload the Python code to Snowflake to then run it?
I think it needs to be a stored procedure but I…

Grant Culp
- 171
- 9
0
votes
2 answers
Does Snowflake auto converts list of floats to json string?
Some of my data in snowflake is in json str format, but in actual it is list of floats. I used an udf to convert json str to list of floats but seems like snowflake is internally auto converting list of floats to string format again.
Just want to…

NikhilKV
- 48
- 6
0
votes
0 answers
How to import openpyxl in snow park?
I see that opepyxl is supported in snow flake snowpark python https://repo.anaconda.com/pkgs/snowflake/ but every time I do import inside snowpark, I see the the below error:
Python Interpreter Error: Traceback (most recent call last): File…

Nidhi
- 1
0
votes
1 answer
Can Snowpark be used to extract data from any database
I was exploring snowpark, but wanted to know , if it provides flexibility to extract data from any database

Priya Chauhan
- 445
- 1
- 5
- 21
0
votes
1 answer
Append new column to a Snowpark DataFrame with simple string
I've started using python Snowpark and no doubt missing obvious answers based on being unfamiliar to the syntax and documentation.
I would like to do a very simple operation: append a new column to an existing Snowpark DataFrame and assign with a…

Dave-C
- 5
- 2
- 6
0
votes
2 answers
Write pandas.DataFrame to snowflake with snowflake.snowpark
I need write dataframe to snowflake, by using snowflake.snowpark. I have some pandas.DataFrame, have some transformation (corr matrix, description stats, model output,...), but I cant write it back to my snowflake database. Thanks for help.
from…

314mip
- 383
- 1
- 4
- 13
0
votes
0 answers
I am trying to create a stored procedure in snowflake using Python and want to use Fuzzywuzzy package but getting below Error
SQL compilation error: Anaconda terms must be accepted by ORGADMIN to use Anaconda 3rd party packages. Please follow the instructions at…

Dhrumil Shah
- 1
- 2
0
votes
1 answer
SNOWPARK - How to use a sql command returned in a dataframe in anoter sql command downstream
How do I return the sql command in sql_df1 and automate the use of this command in another sql command
sql_df1= test_session.sql("select get_ddl('TABLE', 'A.TEST')")
sql_df1.show()
---------------------------------
|"GET_DDL('TABLE', 'A.TEST')" …

lunbox
- 331
- 3
- 11
0
votes
0 answers
Update JSON value using JPATH in Python or SnowPark
Trying to update JSON attribute value in line using JPATH.
Trying a solution in Python but also assessing Snowpark alternative(assuming data loaded in a table in variant column).
Python code is working for Objects but failing in case of arrays…

Ankit Srivastava
- 57
- 7
0
votes
1 answer
Is there a way to get the config of the account and roles, warehouses using snowpark api
Is there a way to extract the config of the account,roles and warehouses from snowflake api. Is it possible to use the api to create ones using the extracted config?
from snowflake.snowpark import Session
from snowflake.snowpark.functions import…

lunbox
- 331
- 3
- 11
0
votes
0 answers
Download scoped file using snowpark python
I have shared a secured view from one account to another account using the secured view in snowflake following the method described in this link. The file (pdf) could be able to download from the target account's worksheet.
Is it possible to…

Jana
- 137
- 2
- 11
0
votes
1 answer
Is there any way to import Azure Blob Services Package in Snowpark
I've created the python script which read the excel file from azure blob storage and parse into multiple CSV files. The script is working fine in python. But I try to run the same file using snowpark it throws the error as "Modulenotfound" for azure…
0
votes
2 answers
Why does a select on an ordered DataFrame in Snowpark destroys ordering?
In Snowpark (Python API, version 0.11.0), I try to order an Dataframe according to an attribute COUNT_OBJ, then show the top 5 EVENTDATES. I realized that the subsequent "select" destroys the ordering of the Dataframe. Is that to be expected?
As a…

Raphael Roth
- 26,751
- 15
- 88
- 145
0
votes
0 answers
Getting "Permission denied" while accessing Temp file created by Python Temp module in Snowpark session
I am trying to load the file from local filesystem to Snowflake stage using Snowpark. For creating sample file, i am using python's temp module . I am able to create temporary file and write data into it and read the content . But while accessing…

HimanshuSPaul
- 278
- 1
- 4
- 19
0
votes
1 answer
Why can't I create a temporary view in Snowflake through the Snowpark API?
I am looking to create a temporary view on Snowflake using the Snowpark API (version 1.6.0). I have created a DataFrame and was attempting to use the createOrReplaceTempView() function as follows:
// code to create dataframe here
…

Rohan Aletty
- 2,432
- 1
- 14
- 20