You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/21 19:56:26 UTC
[GitHub] [superset] pkdotson opened a new pull request, #19811: WIP: Registry to datasourcedao
pkdotson opened a new pull request, #19811:
URL: https://github.com/apache/superset/pull/19811
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eschutho commented on a diff in pull request #19811: WIP: Registry to datasourcedao
Posted by GitBox <gi...@apache.org>.
eschutho commented on code in PR #19811:
URL: https://github.com/apache/superset/pull/19811#discussion_r863272455
##########
superset/__init__.py:
##########
@@ -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 (
Review Comment:
you're going to want to add the datasourceDao in here so that you can reference it later like `from superset import DatasourceDAO`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eschutho commented on a diff in pull request #19811: WIP: Registry to datasourcedao
Posted by GitBox <gi...@apache.org>.
eschutho commented on code in PR #19811:
URL: https://github.com/apache/superset/pull/19811#discussion_r863274321
##########
superset/models/dashboard.py:
##########
@@ -46,11 +46,12 @@
from sqlalchemy.sql import join, select
from sqlalchemy.sql.elements import BinaryExpression
-from superset import app, ConnectorRegistry, db, is_feature_enabled, security_manager
+from superset import app, db, is_feature_enabled, security_manager
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
Review Comment:
use `from superset import DatasourceDAO`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eschutho commented on a diff in pull request #19811: WIP: Registry to datasourcedao
Posted by GitBox <gi...@apache.org>.
eschutho commented on code in PR #19811:
URL: https://github.com/apache/superset/pull/19811#discussion_r863274559
##########
superset/models/slice.py:
##########
@@ -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
Review Comment:
use `from superset import DatasourceDAO`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eschutho commented on a diff in pull request #19811: WIP: Registry to datasourcedao
Posted by GitBox <gi...@apache.org>.
eschutho commented on code in PR #19811:
URL: https://github.com/apache/superset/pull/19811#discussion_r863272632
##########
superset/common/query_object_factory.py:
##########
@@ -21,25 +21,25 @@
from superset.common.chart_data import ChartDataResultType
from superset.common.query_object import QueryObject
+from superset.dao.datasource import DatasourceDAO
Review Comment:
use `from superset import DatasourceDAO` here like ConnectorRegistry was below in the type_checking
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eschutho commented on a diff in pull request #19811: WIP: Registry to datasourcedao
Posted by GitBox <gi...@apache.org>.
eschutho commented on code in PR #19811:
URL: https://github.com/apache/superset/pull/19811#discussion_r863272802
##########
superset/dashboards/commands/importers/v0.py:
##########
@@ -24,9 +24,10 @@
from flask_babel import lazy_gettext as _
from sqlalchemy.orm import make_transient, Session
-from superset import ConnectorRegistry, db
+from superset import db
from superset.commands.base import BaseCommand
from superset.connectors.sqla.models import SqlaTable, SqlMetric, TableColumn
+from superset.dao.datasource import DatasourceDAO
Review Comment:
use `from superset import DatasourceDAO`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eschutho commented on a diff in pull request #19811: WIP: Registry to datasourcedao
Posted by GitBox <gi...@apache.org>.
eschutho commented on code in PR #19811:
URL: https://github.com/apache/superset/pull/19811#discussion_r863272455
##########
superset/__init__.py:
##########
@@ -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 (
Review Comment:
you're going to want to add the datasourceDao in here so that you can reference it later like `superset.DatasourceDAO`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eschutho commented on a diff in pull request #19811: WIP: Registry to datasourcedao
Posted by GitBox <gi...@apache.org>.
eschutho commented on code in PR #19811:
URL: https://github.com/apache/superset/pull/19811#discussion_r863272632
##########
superset/common/query_object_factory.py:
##########
@@ -21,25 +21,25 @@
from superset.common.chart_data import ChartDataResultType
from superset.common.query_object import QueryObject
+from superset.dao.datasource import DatasourceDAO
Review Comment:
use `superset.DatasourceDAO` here like ConnectorRegistry was below in the type_checking
##########
superset/common/query_object_factory.py:
##########
@@ -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
Review Comment:
put the new import here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] pkdotson closed pull request #19811: WIP: Registry to datasourcedao
Posted by GitBox <gi...@apache.org>.
pkdotson closed pull request #19811: WIP: Registry to datasourcedao
URL: https://github.com/apache/superset/pull/19811
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org