File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 37
37
_TOP_LEVEL_DOMAIN_REGEX = r"\.[a-zA-Z]{1,63}$"
38
38
_SNOWFLAKE_HOST_SUFFIX_REGEX = r"snowflakecomputing(\.[a-zA-Z]{1,63}){1,2}$"
39
39
40
+ _PARAM_USE_SCOPED_TEMP_FOR_PANDAS_TOOLS = "ENABLE_FIX_1375538"
41
+
40
42
41
43
class FieldType (NamedTuple ):
42
44
name : str
Original file line number Diff line number Diff line change 22
22
from snowflake .connector .telemetry import TelemetryData , TelemetryField
23
23
24
24
from ._utils import (
25
- _PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING ,
26
25
TempObjectType ,
27
26
get_temp_type_for_object ,
28
27
random_name_for_temp_object ,
29
28
)
29
+ from .constants import _PARAM_USE_SCOPED_TEMP_FOR_PANDAS_TOOLS
30
30
from .cursor import SnowflakeCursor
31
31
32
32
if TYPE_CHECKING : # pragma: no cover
@@ -353,20 +353,13 @@ def write_pandas(
353
353
f"Invalid compression '{ compression } ', only acceptable values are: { compression_map .keys ()} "
354
354
)
355
355
356
+ # TODO(SNOW-1505026): Get rid of this when the BCR to always create scoped temp for intermediate results is done.
356
357
_use_scoped_temp_object = (
357
- conn ._session_parameters .get (
358
- _PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING , False
359
- )
358
+ conn ._session_parameters .get (_PARAM_USE_SCOPED_TEMP_FOR_PANDAS_TOOLS , False )
360
359
if conn ._session_parameters
361
360
else False
362
361
)
363
362
364
- """sfc-gh-yixie: scoped temp stage isn't required out side of a SP.
365
- TODO: remove the following line when merging SP connector and Python Connector.
366
- Make sure `create scoped temp stage` is supported when it's not run in a SP.
367
- """
368
- _use_scoped_temp_object = False
369
-
370
363
if create_temp_table :
371
364
warnings .warn (
372
365
"create_temp_table is deprecated, we still respect this parameter when it is True but "
You can’t perform that action at this time.
0 commit comments