Skip to content

SNOW-2095102: Enable to set autocommit when creating connection #2316

@janb-frontify

Description

@janb-frontify

What is the current behavior?

I'm using:

SQLAlchemy==2.0.40
snowflake-connector-python==3.15.0
snowflake-sqlalchemy==1.7.3

Currently when opening connection, no matter what, it runs:

ALTER SESSION SET autocommit=False

I have tried:

engine.connect().execution_options(autocommit=False)

And I also have it set on Engine level:
connect_args={"sslcompression": 0, "autocommit": True}

How can I change this, is this even possible? It seems like ALTER SESSION SET autocommit=False is currently run always, and then I have to explicitely change it.

What is the desired behavior?

Be able to set autocommit=True when creating connection so it does not run ALTER SESSION SET autocommit=False.

How would this improve snowflake-connector-python?

Makes it run less statements.

References and other background

No response

Metadata

Metadata

Assignees

Labels

featurestatus-triage_doneInitial triage done, will be further handled by the driver team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions