eschutho commented on code in PR #21690:
URL: https://github.com/apache/superset/pull/21690#discussion_r988423678
##########
superset/db_engine_specs/gsheets.py:
##########
@@ -209,13 +210,25 @@ def parameters_json_schema(cls) -> Any:
spec.components.schema(cls.__name__, schema=cls.parameters_schema)
return spec.to_dict()["components"]["schemas"][cls.__name__]
+ @classmethod
+ def get_engine_parameters(cls, properties: Dict[str, Any]) -> Dict[str,
Any]:
+ try:
+ if properties.get("extra"):
+ return json.loads(properties["extra"]).get("engine_params", {})
+ return {}
+ except TypeError as ex:
+ raise DatabaseExtraJSONValidationError(
+ "Unable to parse extra_json data"
+ ) from ex
+
@classmethod
def validate_parameters(
cls,
- properties: GSheetsPropertiesType,
+ properties: Dict[str, Any],
Review Comment:
you can change the GSheetsPropertiesType to match what you need.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]