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

SNOW-1746236: Allow cloning a table #2465

Open
tvdboom opened this issue Oct 17, 2024 · 1 comment
Open

SNOW-1746236: Allow cloning a table #2465

tvdboom opened this issue Oct 17, 2024 · 1 comment
Assignees
Labels
feature New feature or request status-triage_done Initial triage done, will be further handled by the driver team

Comments

@tvdboom
Copy link

tvdboom commented Oct 17, 2024

What is the current behavior?

Currently the only way to store a table is using save_as_table, which (as far as I know) performs a CTAS operation. Cloning a table is considerably faster than doing a select * from XX CTAS but it's currently impossible to do in snowpark.

What is the desired behavior?

A method for the Table class to clone himself to a new location.

@tvdboom tvdboom added the feature New feature or request label Oct 17, 2024
@github-actions github-actions bot changed the title Allow cloning a table SNOW-1746236: Allow cloning a table Oct 17, 2024
@sfc-gh-sghosh sfc-gh-sghosh self-assigned this Oct 29, 2024
@sfc-gh-sghosh
Copy link

Hello @tvdboom ,

Thanks for raising this request. At present Snowpark Python doesnt have any clone feature. will let you know if any such plan.

As a workaround, you can use session.sql and use clone command

example
session.sql("""
CREATE TABLE IF NOT EXISTS new_table_name
CLONE source_table_name
AT (TIMESTAMP => '2024-10-01 12:00:00')
""").collect()

Regards,
Sujan

@sfc-gh-sghosh sfc-gh-sghosh added the status-triage_done Initial triage done, will be further handled by the driver team label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

3 participants