Skip to content

SNOW-2173685 respect existing param control of using SCOPED keyword f… #2374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions src/snowflake/connector/pandas_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from snowflake.connector.telemetry import TelemetryData, TelemetryField

from ._utils import (
_PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING,
TempObjectType,
get_temp_type_for_object,
random_name_for_temp_object,
Expand Down Expand Up @@ -354,19 +353,11 @@ def write_pandas(
)

_use_scoped_temp_object = (
conn._session_parameters.get(
_PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING, False
)
conn._session_parameters.get("ENABLE_FIX_1375538", False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a note to remove this with a BCR from the server side to make these temp objects job scoped.

Also, let's use a more meaning variable name to represent ENABLE_FIX_1375538. We should verify if this param can be fetched outside of sp. I suspect not and this might just be a pure no-op outside of sp.

if conn._session_parameters
else False
)

"""sfc-gh-yixie: scoped temp stage isn't required out side of a SP.
TODO: remove the following line when merging SP connector and Python Connector.
Make sure `create scoped temp stage` is supported when it's not run in a SP.
"""
_use_scoped_temp_object = False

if create_temp_table:
warnings.warn(
"create_temp_table is deprecated, we still respect this parameter when it is True but "
Expand Down
Loading