snowflakedb / snowflake-ml-python

Apache License 2.0
39 stars 9 forks source link

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

Open Synohara opened 4 months ago

Synohara commented 4 months ago

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:

https://github.com/snowflakedb/snowflake-ml-python/blob/2932445f3e0fbf42000d51ec9c9256032570ed76/snowflake/ml/modeling/preprocessing/ordinal_encoder.py#L250-L258

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.

sfc-gh-sdas commented 3 months ago

Thanks for reporting. We are aware of this issue. Native Apps team is considering some workaround for this.