-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: support for query parameters #363
Conversation
@sidazhang @jeremi FYI, this is going to be released soon (you were asking about this in the past). |
13cc196
to
c0c1022
Compare
Feature: support for query parameters
@arikfr This is awesome. I am very excited to try this out. And all these commercial vendors dares to charge $1000+ a month? |
@sidazhang let me know if you need guidance on how to upgrade from your current re:dash version. |
Ooohhhh...I'm on v0.5.0+b681 and just demo-ed this. Can it be done with dashboards with charts too? |
@gabrielcrowdtilt yes. works the same with dashboard/charts. |
Hi Arik!. I tried to add a table/chart using a query with this solution but the table/chart added doesn't show any results. I guess this is because the dashboard url doesn't have the value parameters needed to executed successfully the query associated with the table/chart. How can I do it correctly? |
@maflorvega as you figured, you need to pass the parameter(s). You do this the same as you do in the query view: pass it from the URL with the prefix |
Thanks Arik!!! |
Arik , do you know if there is any way to set a default value to the parameters? Regards |
@matiascarazzo not at the moment, but I do want to add this option. Improving the usability of the parameters feature is the next thing I'm going to work on. Next week I'm on vacation, but hopefully I get to work on it the week after when I'm back. |
@arikfr what about using it with api/queries/.../results.json ? I'm trying to build dynamic api to use with my Dashboard UI. |
@afterlastangel I did some work to prepare support for it, and maybe in the next release it will be possible. |
@arikfr what about widget/virtualization with parameters? I'm going create a chart with date range as parameter, so we need a way add the date range picker. If you didn't have a planing for it, then I could try with the widget then make a pull request. |
Widgets/visualizations already support parameters, see: demo.redash.io/queries/146/source?p_action=create for example. What's missing is UI and that's planned for one of the next releases. |
@arikfr thank you. I just question about the Widgets UI for parameters, if you didn't implement it yet, I could try to create some for my own using. |
@arikfr I'm having trouble passing parameters into a column with a string or date data type. where url param: Error: When using single quotes in the url param, the url is then encoded: causing a new error: Any workaround on this? |
@Bitcoyne in your query you could wrap your parameter in quotes and percentages as follows:
|
@arikfr I created a user with 'read only' permission on the datasource, but that user was not able to get result by passing query string. is this a known issue? |
@ChiragKParmar currently it's the intended behavior for two reasons:
Until #2 properly addressed, we can't allow read only users use parameters. :( |
Hi @arikfr Any update on the GUI part for parameters? It's the last piece in the puzzle for us. Three things would be especially useful:
|
Any update on the GUI part of parameters? |
It's been implemented and released. On Mon, 14 Nov 2016 at 15:14 sks-369 notifications@github.com wrote:
|
Is the query parameters dropdown select box for available for testing in any particular version yet? Thanks for all the hard work! |
This is initial work on support for query parameters. Currently it works by detecting mustache style parameters in the query text, and merging them with values from the URL query string.
No UI yet, you have to use the query string.