Skip to content

Commit 05b2a6d

Browse files
committed
fix: stage or self.stage
1 parent 17fec9f commit 05b2a6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

snowflake_utils/models/table.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from snowflake.connector.cursor import SnowflakeCursor
77

88
from ..queries import execute_statement
9-
from ..settings import connect, governance_settings, SnowflakeSettings
9+
from ..settings import SnowflakeSettings, connect, governance_settings
1010
from .column import Column, MetadataColumn, _inserts, _matched, _type_cast
1111
from .enums import MatchByColumnName, TagLevel
1212
from .file_format import FileFormat, InlineFileFormat
@@ -230,7 +230,7 @@ def copy_into(
230230
copy_query = f"""
231231
COPY INTO {self.fqn} {col_str}
232232
FROM {{from_clause}}
233-
{f"STORAGE_INTEGRATION = {storage_integration}" if storage_integration and not stage else ""}
233+
{f"STORAGE_INTEGRATION = {storage_integration}" if storage_integration and not (stage or self._stage) else ""}
234234
FILE_FORMAT = ( FORMAT_NAME ='{{file_format}}')
235235
MATCH_BY_COLUMN_NAME={match_by_column_name.value}
236236
{files_clause}

0 commit comments

Comments
 (0)