betodealmeida commented on a change in pull request #14653:
URL: https://github.com/apache/superset/pull/14653#discussion_r633900053
##########
File path: superset/databases/schemas.py
##########
@@ -248,6 +248,9 @@ def build_sqlalchemy_uri(
"""
parameters = data.pop("parameters", None)
if parameters:
+ if len(parameters.keys()) < 2:
+ return data
Review comment:
Why do we need this?
##########
File path: superset/models/core.py
##########
@@ -236,6 +237,17 @@ def backend(self) -> str:
sqlalchemy_url = make_url(self.sqlalchemy_uri_decrypted)
return sqlalchemy_url.get_backend_name() # pylint: disable=no-member
+ @property
+ def parameters(self) -> Optional[Dict[str, Any]]:
+ # Build parameters if db_engine_spec is a subclass of
BasicParametersMixin
+ parameters = {"engine": self.backend}
+
+ if issubclass(self.db_engine_spec, BasicParametersMixin):
Review comment:
This will not work for BigQuery; we should change it so it works with
any DB engine spec that supports the parameters:
```suggestion
if self.db_engine_spec.parameters_schema is not None:
```
--
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]