etr2460 commented on a change in pull request #7702: [sqla] Enforcing ISO 8601
date/timestamp formats
URL:
https://github.com/apache/incubator-superset/pull/7702#discussion_r293486645
##########
File path: superset/connectors/sqla/views.py
##########
@@ -108,6 +115,23 @@ class TableColumnInlineView(CompactCRUDMixin,
SupersetModelView): # noqa
'database_expression': _('Database Expression'),
'type': _('Type'),
}
+ validators_columns = {
+ 'python_date_format': [
+ Regexp(
+ re.compile(
+ r"""
+ ^(
+ epoch_s|epoch_ms|
+ (?P<date>%Y(-%m(-%d)?)?)
+ ([\sT](?P<time>%H(:%M(:%S(\.%f)?)?)?))?
Review comment:
i trust that this is right, but maybe it's worth adding a comment explaining
the regex?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]