0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Redash】クエリパラメータを使うと、非エンジニアの方でも集計が簡単に!

Last updated at Posted at 2023-09-05

はじめに

Redashを使う中で、「クエリパラメータ」を使うことで非エンジニアの方でも簡単に月次(週次、日次)集計が行えるようになったので、備忘録も兼ねて紹介したいと思います。

解決したい課題

  • 非エンジニアにとってSQLは、暗号にしか見えない...そもそも見たくない。
  • 定時集計のたびにクエリを作成したくない。(極力、1つのクエリを使いまわしたい)

クエリパラメータを使うことで、上記の内容が解決できます。

クエリパラメータ

クエリパラメータとは、クエリの一部をパラメータ化して、任意の数値や文字列を与えることの出来る機能です。

実際にクエリパラメータを使った例

クエリパラメータをSQLの中に仕込むことで、Redashの画面上から集計したい期間が選択可能になる。

image.png

非エンジニアの方でも、暗号のようなSQL文に触ること無く、簡単に集計したい期間を選択することができます。
image.png

未経験からのSQLの勉強法について

いちばん重要なのは、とにかく手を動かすことです!
以下の記事内容に沿って、進めていくと習得しやすいです!

ビジネスサイドがSQLを学ぶ意義と、その勉強方法

参考

公式ドキュメント
https://redash.io/help/user-guide/querying/query-parameters

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?