Skip to content

Compatibility Issue: Temporary Table Creation in save_as_table Conflicts with Snowflake Native Apps #103

@Synohara

Description

@Synohara

I've encountered a compatibility problem when using snowflake-ml-python within a Snowflake Native App environment. The issue stems from the internal use of snowpark.DataFrame.save_as_table within the library (e.g., in OrdinalEncoder).

This method appears to create a temporary table under the hood:

state_df.write.save_as_table( # type: ignore[call-overload]
self._vocab_table_name,
mode="overwrite",
table_type="temporary",
statement_params=telemetry.get_statement_params(base.PROJECT, base.SUBPROJECT, self.__class__.__name__),
)
self._state_pandas = state_df.to_pandas(
statement_params=telemetry.get_statement_params(base.PROJECT, base.SUBPROJECT, self.__class__.__name__)
)

However, Snowflake Native Apps have a restriction that prevents the creation of temporary tables. This incompatibility renders certain parts of snowflake-ml-python unusable within Native Apps.

Suggested Resolution:

I'd like to request that the team consider a modification to address this limitation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions