snowflake-cloud-data-platform

Efficient Way to Replace Unicode Hex Character Codes in Snowflake String

Efficient Way to Replace Unicode Hex Character Codes in Snowflake String Question: I currently have an issue where text I am importing includes Unicode Hex Character Codes in item descriptions. For example,   may appear for a no-break space, ê may appear for the French language "ê", etc. I am wanting the text returned in …

Total answers: 1

Snowflake UDF returns "Unknown user-defined function" For Existing UDF

Snowflake UDF returns "Unknown user-defined function" For Existing UDF Question: I have a UDF that I can call within my snowflakecomputing.com console. SELECT DECODE_UTF8(‘some string’) Works great, until I try to call it programmatically from a Python script. I receive this… snowflake.connector.errors.ProgrammingError: 002141 (42601): or: Unknown user-defined function CS_QA.CS_ANALYTICS.DECODE_UTF8 I am even fully qualifying it …

Total answers: 2

How to handle when connection pool gets exhausted using snowflake with python

How to handle when connection pool gets exhausted using snowflake with python Question: can someone explain me how can we handle the situation when the max connections limit has been reached for any database. Can we make a connection in wait state until any existing connection gets released automatically. import snowflake.connector as sf import sqlalchemy.pool …

Total answers: 2

Invalid date, while writing pandas dataframe into snowflake table

Invalid date, while writing pandas dataframe into snowflake table Question: I have a pandas dataframe in which the date is having datetime64 dtype but when I am writing this dataframe to snowflake, the date values are showing invalid. date_1 Invalid Date Invalid Date Invalid Date while in dataframe I have values like below : date_1 …

Total answers: 2

How to connect SQLAlchemy to Snowflake database using OAuth2?

How to connect SQLAlchemy to Snowflake database using OAuth2? Question: I need to connect to Snowflake using SQLAlchemy but the trick is, I need to authenticate using OAuth2. Snowflake documentation only describes connecting using username and password and this cannot be used in the solution I’m building. I can authenticate using Snowflake’s python connector but …

Total answers: 2

Setting Snowflake converter_class Still Converts to Python Data Types

Setting Snowflake converter_class Still Converts to Python Data Types Question: In the docs for the python Snowflake connector, it says that setting the connection parameter converter_class when creating the connection object can be used to suppress conversion to python types (leaves data as strings). But I see no difference between queries run with the following …

Total answers: 1

Snowflake table as external table in databricks hive metastore

Snowflake table as external table in databricks hive metastore Question: Does anyone know if it is possible to set a snowflake table as an external table in databricks hive metastore? I’m working on a project in which we have some tables in Azure Data Lake Gen 2 and we are managing them from databricks. For …

Total answers: 2

Error while using "pd_writer" to write data to snowflake – 'not all arguments converted during string formatting'

Error while using "pd_writer" to write data to snowflake – 'not all arguments converted during string formatting' Question: Getting this error while calling the "pd_writer" method: DatabaseError("Execution failed on sql ‘SELECT name FROM sqlite_master WHERE type=’table’ AND name=?;’: not all arguments converted during string formatting",) def sf_To_df(self): sf_data = self.salesForceAuth.query_all(self.queryColumns) sf_data=dict(sf_data) try: cursor=snowflake.connector.connect(user=snowflake_user_path, ​ paccount=snowflake_account, …

Total answers: 1