Skip to content

Commit

Permalink
chore: remove sl_ tables (apache#28704)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored and EnxDev committed May 31, 2024
1 parent 3b9683c commit 3469ae9
Show file tree
Hide file tree
Showing 16 changed files with 202 additions and 737 deletions.
115 changes: 0 additions & 115 deletions superset/columns/models.py

This file was deleted.

40 changes: 0 additions & 40 deletions superset/columns/schemas.py

This file was deleted.

6 changes: 1 addition & 5 deletions superset/daos/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,19 @@
from superset.connectors.sqla.models import SqlaTable
from superset.daos.base import BaseDAO
from superset.daos.exceptions import DatasourceNotFound, DatasourceTypeNotSupportedError
from superset.datasets.models import Dataset
from superset.models.sql_lab import Query, SavedQuery
from superset.tables.models import Table
from superset.utils.core import DatasourceType

logger = logging.getLogger(__name__)

Datasource = Union[Dataset, SqlaTable, Table, Query, SavedQuery]
Datasource = Union[SqlaTable, Query, SavedQuery]


class DatasourceDAO(BaseDAO[Datasource]):
sources: dict[Union[DatasourceType, str], type[Datasource]] = {
DatasourceType.TABLE: SqlaTable,
DatasourceType.QUERY: Query,
DatasourceType.SAVEDQUERY: SavedQuery,
DatasourceType.DATASET: Dataset,
DatasourceType.SLTABLE: Table,
}

@classmethod
Expand Down
118 changes: 0 additions & 118 deletions superset/datasets/models.py

This file was deleted.

13 changes: 0 additions & 13 deletions superset/datasets/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
from flask_babel import lazy_gettext as _
from marshmallow import fields, pre_load, Schema, ValidationError
from marshmallow.validate import Length
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema

from superset.datasets.models import Dataset
from superset.exceptions import SupersetMarshmallowValidationError
from superset.utils import json

Expand Down Expand Up @@ -291,17 +289,6 @@ class GetOrCreateDatasetSchema(Schema):
always_filter_main_dttm = fields.Boolean(load_default=False)


class DatasetSchema(SQLAlchemyAutoSchema):
"""
Schema for the ``Dataset`` model.
"""

class Meta: # pylint: disable=too-few-public-methods
model = Dataset
load_instance = True
include_relationships = True


class DatasetCacheWarmUpRequestSchema(Schema):
db_name = fields.String(
required=True,
Expand Down

0 comments on commit 3469ae9

Please sign in to comment.