zhaoyongjie commented on PR #21767:
URL: https://github.com/apache/superset/pull/21767#issuecomment-1625336863
> > > Two questions on this feature:
> > >
> > > 1. How does this work in dashboards. Even if I add two time range
filters in a dashboard, it is not possible to select the correct date columns
> >
> >
> > What version of Superset do you use? Native filter in the Dashboard
should append a new time filter, so I think it should be worked on Dashboard.
> > > 2. How does this feature work with jinja templates? Are there any
other variables than `{{ from_dttm }}` and `{{ to_dttm }}` to support this
feature?
> >
> >
> > Should support Jinja Template if not, it should be a regression bug.
>
> 1. In jinja, it is giving result in the form of
> {
> ...
> filters: {
> "col": "Date1",
> "op": "TEMPORAL_RANGE",
> "val": "DATEADD(DATETIME("2022-10-10T00:00:00"), -20, year) :
2022-10-10T00:00:00"
> },
> {
> "col": "Date1",
> "op": "TEMPORAL_RANGE",
> "val": "Last day : 2022-10-10T00:00:00"
> }
> ```
> }
> ```
>
> ideally it should give result in the form of timestamp so it can be easily
used in sql just like from_dttm and to_dttm. Can we parse above values to get
timestamp from above format effectively ?
The **val** in each time filter means that dynamically calculate "from date
time" and "to date time". If you just want to use fixed timestamp, leave
timestamp string in Custom, for instance:
<img width="991" alt="image"
src="https://github.com/apache/superset/assets/2016594/367a638c-a08a-4acd-b617-8f2fe03c21b6">
>
> 2. Also at my end, if i create two dashboard filters i.e. created_at and
updated_at , it is applying filter values against these 2 filters on my default
datetime/temporal column i.e. last_state_change_time
>
> 
It might be a regression bug, I've revert this
[PR](https://github.com/apache/superset/pull/24176) in my custom Superset. I
hope it should help with you.
--
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]