Skip to main content

All Questions

3 votes
2 answers
29 views

Rows not getting added to Snowflake table using Python connector

I am trying to create and load a table in Snowflake using Python. The data is in a pandas data frame. Below is the code I'm using. The table gets created, but it has 0 rows and there's no error ...
Moon_Watcher's user avatar
0 votes
1 answer
84 views

250001: Could not connect to Snowflake backend after 2 attempt(s).Aborting

I am trying to connect to snowflake using sql database and snowflake url but I am getting "Could not connect error". This is the code that I am using: from langchain import OpenAI, ...
Manmeet 's user avatar
0 votes
0 answers
39 views

Issues with SQLAlchemy

I'm trying to run the following code (some of the stuff I blind, like the passwords)to get some Snowflake data into a Jupyter notebook: import math as math import numpy as np; import pandas as pd; ...
jajastrzemb's user avatar
1 vote
1 answer
38 views

Snowflake SQLAlchemy - Dynamically created column with Timestamp?

This is a follow-up question to my previous one. Snowflake SQLAlchemy - Create table with Timestamp? I am dynamically creating columns and I have this schema. I need the "my_time_stamp" ...
MountainBiker's user avatar
2 votes
1 answer
50 views

Create nested queries with SQLAlchemy

I have a nested query that I need to write in a Pyhton project using SQLAlchemy, but everything I tried doesn't seem to work and I keep getting errors. This is the SQL query (I'm using Snowflake) and ...
Diana Cazacu's user avatar
0 votes
1 answer
81 views

Snowflake SQLAlchemy - Create table with Timestamp?

I am creating table definitions with SqlAlchemy in Python. I am able to successfully create a table with primary key which autoincrements and some other fields. However, I haven't been able to find ...
MountainBiker's user avatar
0 votes
0 answers
49 views

Mocking snowflake VARIANT type in pytest

In the team we are using Snowflake as a relational database. We one field has VARIANT type. As ORM I am using SQLAlchemy along with snowflake-sqlalchemy. I defined the following model: class Table1(...
Rafał Kobiela's user avatar
0 votes
1 answer
57 views

Appending tuples returned by for loop

I am running some SQL queries using sqlalchemy. I have a for loop that runs queries against Snowflake tables. Current Code: for x in list: results = cursor.execute(f"SELECT TABLE_NAME as ...
Nairda123's user avatar
  • 303
0 votes
1 answer
142 views

Querying Snowflake using SQLAlchemy

Trying to query with SQLAlchemy against Snowflake table from sqlalchemy import create_engine, text, Table, MetaData engine = create_engine( 'snowflake://{user}:{password}@{account_identifier}/'....
John Eipe's user avatar
  • 11.1k
3 votes
0 answers
64 views

Disabling bound parameters in SQLAlchemy Execute

I am using sqlalchemy-snowflake to execute a query which includes JSON: %sql select parse_json('{"fruit":"banana"}'):fruit :fruit is valid Snowflake SQL, see here. Executing this ...
Bryan Ho's user avatar
-1 votes
1 answer
3k views

How to fix ' ImportError: cannot import name 'string_types' from 'sqlalchemy.util.compat'?

I am using Python to connect to Snowflake database to run sql query but encountered this error. It is a new error as I can run the code without issue previously. Traceback (most recent call last): ...
hyyyy's user avatar
  • 1
0 votes
1 answer
258 views

Intermittent Problem connecting to Snowflake

We have an Azure Function App running Python that conects to Snowflake database like below: from sqlalchemy import create_engine from sqlalchemy.engine import Connection engine = ...
Pingpong's user avatar
  • 7,899
1 vote
1 answer
229 views

Date data type not preserved in Snowflake to Pandas dataframe

I have a Snowflake table that includes a date field. When I query Snowflake and load the data into a Pandas dataframe the date is always converted to object data type in the Pandas dataframe. I've ...
cmcau's user avatar
  • 557
0 votes
0 answers
45 views

Execute an update using single-quoted columns in sqlalchemy

I am writing some tests for our SQL code and have some defined tables: class CompanyAddressORM(Base): __tablename__ = "company_address" pk = Column("pk", Text, ...
Drivebyluna's user avatar
0 votes
1 answer
46 views

Take the last entry of each row when Flag is a specific value in SQL

I have a data source that looks something like this: Signal Value Power value 1 -100 2 99 3 95 4 -64 5 -55 6 92 7 -80 8 23 9 -66 10 -56 11 -46 The signal values are actually random, not ...
Santiago Milan's user avatar

15 30 50 per page
1
2 3 4 5
8