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

Ref/sqlalchemy session #2714

Merged
merged 9 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add a standalone flag in Streamlit to mark the page as independent.
- Add secrets directory mount for loading secret env vars.
- Remove components recursively
- Add metadata batched db updates

#### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion plugins/ibis/superduper_ibis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .data_backend import IbisDataBackend as DataBackend
from .query import IbisQuery

__version__ = "0.4.7"
__version__ = "0.4.8"

__all__ = ["IbisQuery", "DataBackend"]
6 changes: 3 additions & 3 deletions plugins/ibis/superduper_ibis/data_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ def drop_table_or_collection(self, name: str):
:param name: Table name to drop.
"""
try:
return self.db.databackend.conn.drop_table(name)
return self.conn.drop_table(name)
except Exception as e:
msg = "Object found is of type 'VIEW'"
if msg in str(e):
return self.db.databackend.conn.drop_view(name)
return self.conn.drop_view(name)
raise

def create_output_dest(
Expand Down Expand Up @@ -300,7 +300,7 @@ def drop(self, force: bool = False):

for table in self.conn.list_tables():
logging.info(f"Dropping table: {table}")
self.conn.drop_table(table)
self.drop_table_or_collection(table)

def get_table_or_collection(self, identifier):
"""Get a table or collection from the database.
Expand Down
1 change: 1 addition & 0 deletions plugins/sqlalchemy/plugin_test/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@pytest.fixture
def metadata():
store = SQLAlchemyMetadata(DATABASE_URL)
store._batched = False
yield store
store.drop(force=True)

Expand Down
2 changes: 1 addition & 1 deletion plugins/sqlalchemy/superduper_sqlalchemy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .metadata import SQLAlchemyMetadata as MetaDataStore

__version__ = "0.4.5"
__version__ = "0.4.6"

__all__ = ['MetaDataStore']
Loading
Loading