diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index 046f14f1e6b3f..a7bcab6b3786f 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -487,9 +487,9 @@ class DatasourceEditor extends React.PureComponent { const { datasource } = this.state; const endpoint = `/datasource/external_metadata_by_name/${ datasource.type || datasource.datasource_type - }/${datasource.database.database_name}/${datasource.schema}/${ - datasource.table_name - }/`; + }/${datasource.database.database_name || datasource.database.name}/${ + datasource.schema + }/${datasource.table_name}/`; this.setState({ metadataLoading: true }); SupersetClient.get({ endpoint })