We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb12df2 commit dda163fCopy full SHA for dda163f
src/snowflake/connector/direct_file_operation_utils.py
@@ -5,6 +5,7 @@
5
if TYPE_CHECKING:
6
from .connection import SnowflakeConnection
7
8
+import os
9
from abc import ABC, abstractmethod
10
11
from .constants import CMD_TYPE_UPLOAD
@@ -62,8 +63,8 @@ def parse_file_operation(
62
63
64
if command_type == CMD_TYPE_UPLOAD:
65
if has_source_from_stream:
- stage_location, unprefixed_local_file_name = stage_location.rsplit(
66
- "/", maxsplit=1
+ stage_location, unprefixed_local_file_name = os.path.split(
67
+ stage_location
68
)
69
local_file_name = "file://" + unprefixed_local_file_name
70
sql = f"PUT {local_file_name} ? {options_in_sql}"
0 commit comments