Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Redash v5 Quick Start Guide

You're reading from   Redash v5 Quick Start Guide Create and share interactive dashboards using Redash

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher Packt
ISBN-13 9781788996167
Length 224 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Alexander Leibzon Alexander Leibzon
Author Profile Icon Alexander Leibzon
Alexander Leibzon
Yael Leibzon Yael Leibzon
Author Profile Icon Yael Leibzon
Yael Leibzon
Arrow right icon
View More author details
Toc

Parametrized queries

When there is a need to dynamically provide conditions (or any predicates, in fact) to the query, without having to rewrite it every time the conditions change, you know that you need query parameters.

Every query can be parametrized, and as we have already seen in filters, there is a convention for this.

Starting Redash v5, there are two ways to add a parameter to your query.

Either you add a keyword that is enclosed in double curly braces, for example, {{param_name}} to your query, and it will automatically introduce a parameter (exactly the same way as it was before v5 release).

Alternatively, you can click on the Add New Parameter button (shortcut Cmd / Ctrl + P).

Once Redash recognizes that you've added a parameter, a special param box will appear in the query editor:

For example, in the preceding query, a parameter named '{{ds_name}}&apos...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime