Skip to content

feat: make name param optional to create_table() #11261

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NickCrews
Copy link
Contributor

Sometimes, I just need to load some temp data into a backend, but I don't care what the table name is. now conn.create_table(obj=data, temp=True) is a nice short way to do that.

Sometimes, I just need to load some temp data into a backend, but I don't care what the table name is. now `conn.create_table(obj=data, temp=True)` is a nice short way to do that.
@github-actions github-actions bot added postgres The PostgreSQL backend sqlite The SQLite backend clickhouse The ClickHouse backend mysql The MySQL backend datafusion The Apache DataFusion backend bigquery The BigQuery backend duckdb The DuckDB backend polars The polars backend snowflake The Snowflake backend mssql The Microsoft SQL Server backend druid The Apache Druid backend flink Issues or PRs related to Flink exasol Issues related to the exasol backend risingwave The RisingWave backend databricks The Databricks backend athena The Amazon Athena backend labels May 28, 2025
@cpcloud
Copy link
Member

cpcloud commented Jun 1, 2025

Any reason you can't use ibis.memtable for this?

@NickCrews
Copy link
Contributor Author

Yes, if obj already is a memtable. .cache() on it doesn't work because you can't choose the backend.

@cpcloud
Copy link
Member

cpcloud commented Jun 2, 2025

I'm not sure we ever discussed this, but what about a con.memtable method, allowing you to choose which backend a memtable goes into, which would allow .cache() to make sense.

@NickCrews
Copy link
Contributor Author

Instead of con.memtable(obj), I would rather just do conn.create_table(obj, temp=True), which I think is more explicit and more familiar.

I think one of the best features of memtables is that they are not bound to a backend. One of the uses for this is in tests. Eg define a memtable with some test data and then create temp tables for this in several different backends (eg to ensure that the feature works across backends).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
athena The Amazon Athena backend bigquery The BigQuery backend clickhouse The ClickHouse backend databricks The Databricks backend datafusion The Apache DataFusion backend druid The Apache Druid backend duckdb The DuckDB backend exasol Issues related to the exasol backend flink Issues or PRs related to Flink mssql The Microsoft SQL Server backend mysql The MySQL backend polars The polars backend postgres The PostgreSQL backend risingwave The RisingWave backend snowflake The Snowflake backend sqlite The SQLite backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants