Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Synohara opened this issue May 29, 2024 · 1 comment

Comments

@Synohara
Copy link

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.

@sfc-gh-sdas
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants