Open fernavid opened 8 years ago
Filter expressions for dates should work, but only one filter is supported.
Looks to me that the filter syntax 5 days user123
is being interpreted as a date filter and is not valid.
Only one filter is supported? The looker help command seems to imply more than one filter is supported. It shows error rates* <username>, <days>
Ah, it's true the help text will show that, which is misleading. But yes, only one filter is supported.
We are trying to figure out a natural syntax for multiple filters. Unfortunately people want to put commas directly into a single filter as well.
+1
Is this still WIP? It'd be really helpful to have this functionality.
@rumanone It's really just a matter of figuring out an understandable syntax for people.
The primary issue is a number of people already use filters like User1, User2
since commas in our filter syntax indicate an OR.
So we either need some other way of handling it, or have a way of marking certain dashboards as able to use multiple filters.
How about a | between filter expressions?
Technically that's a valid character as well but that's what I was thinking as well.
|
pipe char between filter expressions to mean OR, or to mean AND?
Why not the same thing way the explore GUI works, where including a comma in a filter requires escaping with "\"... or maybe putting the entire filter expression in double quotes e.g.:
users Male Washington\, DC or users Male "Washington, DC"
On the subject of multiple filters, it would also be helpful to have the syntax extend to leaving out optional filters... i.e. 1) positional filter arguments using comma-separated values where the filter values are completed in order as they appear in the dashboard (as above, commas within one filter value should be escaped with a forward slash or the entire filter enclosed in double quotes)
users New York City Washington\, DC
or
2) named filter arguments using comma-separated key-value pairs in format "filter_name=filter_value" or "filter_name:filter_value" including filter name / values in any order
users City=Washington\, DC, Gender=Male
this syntax is a little less intuitive for business users, but still would make it a lot easier to share a simple query than building a new dashboard (with a new dashboard name) for every combination of input values -- and in the case of filter values without commas would be pretty straightforward to understand.
Interesting! I really like the named arguments approach, that could be a clean way to differentiate between the current single-filter syntax and a slightly more complex new one. Positional arguments get out of hand really quick here, I think.
+1
+1
+1
+1 this is a very important feature, I hope you will come up with something soon!
+1 Very interested in having this feature too !
+1 again
+1
+1
+1
+1
+1
If a dashboard has a date filter, and you try to query using the looker filter expressions for dates, it returns an empty chart.
@looker dashboard123 5 days user123
looker response: (1kb blank chart)