-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
WIP: Registry to datasourcedao #19811
Conversation
@@ -19,7 +19,6 @@ | |||
from werkzeug.local import LocalProxy | |||
|
|||
from superset.app import create_app | |||
from superset.connectors.connector_registry import ConnectorRegistry | |||
from superset.extensions import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're going to want to add the datasourceDao in here so that you can reference it later like from superset import DatasourceDAO
@@ -21,25 +21,25 @@ | |||
|
|||
from superset.common.chart_data import ChartDataResultType | |||
from superset.common.query_object import QueryObject | |||
from superset.dao.datasource import DatasourceDAO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use from superset import DatasourceDAO
here like ConnectorRegistry was below in the type_checking
@@ -21,25 +21,25 @@ | |||
|
|||
from superset.common.chart_data import ChartDataResultType | |||
from superset.common.query_object import QueryObject | |||
from superset.dao.datasource import DatasourceDAO | |||
from superset.utils.core import apply_max_row_limit, DatasourceDict | |||
from superset.utils.date_parser import get_since_until | |||
|
|||
if TYPE_CHECKING: | |||
from sqlalchemy.orm import sessionmaker | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put the new import here
from superset.commands.base import BaseCommand | ||
from superset.connectors.sqla.models import SqlaTable, SqlMetric, TableColumn | ||
from superset.dao.datasource import DatasourceDAO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use from superset import DatasourceDAO
superset/models/dashboard.py
Outdated
from superset.common.request_contexed_based import is_user_admin | ||
from superset.connectors.base.models import BaseDatasource | ||
from superset.connectors.druid.models import DruidColumn, DruidMetric | ||
from superset.connectors.sqla.models import SqlMetric, TableColumn | ||
from superset.dao.datasource import DatasourceDAO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use from superset import DatasourceDAO
@@ -39,7 +39,8 @@ | |||
from sqlalchemy.orm import relationship | |||
from sqlalchemy.orm.mapper import Mapper | |||
|
|||
from superset import ConnectorRegistry, db, is_feature_enabled, security_manager | |||
from superset import db, is_feature_enabled, security_manager | |||
from superset.dao.datasource import DatasourceDAO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use from superset import DatasourceDAO
3786e29
to
e5c1479
Compare
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION