mistercrunch commented on a change in pull request #10645:
URL: 
https://github.com/apache/incubator-superset/pull/10645#discussion_r512315156



##########
File path: superset/views/datasource.py
##########
@@ -100,21 +100,11 @@ def external_metadata(
         self, datasource_type: str, datasource_id: int
     ) -> FlaskResponse:
         """Gets column info from the source system"""
-        if datasource_type == "druid":
+        try:
             datasource = ConnectorRegistry.get_datasource(
                 datasource_type, datasource_id, db.session
             )
-        elif datasource_type == "table":
-            database = (
-                
db.session.query(Database).filter_by(id=request.args.get("db_id")).one()
-            )
-            table_class = ConnectorRegistry.sources["table"]
-            datasource = table_class(
-                database=database,
-                table_name=request.args.get("table_name"),
-                schema=request.args.get("schema") or None,
-            )
-        else:
-            raise Exception(f"Unsupported datasource_type: {datasource_type}")

Review comment:
       I just checked and it looks like we call `/api/v1/database/1/table/` and 
`/superset/extra_table_metadata/` from SQL Lab, and i think this endpoint used 
to be called in place of `/api/v1/database/1/table/`




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to