{"id":15765,"date":"2021-02-18T22:36:42","date_gmt":"2021-02-18T21:36:42","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/"},"modified":"2021-02-18T22:36:42","modified_gmt":"2021-02-18T21:36:42","slug":"grafana-sql-and-in-list-for-multi-value-variable","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/","title":{"rendered":"Grafana, SQL and IN() list for multi-value variable"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nI&#8217;ve recently looked at Grafana. Pros: it is really nice, I mean aesthetically. If you want to build a dashboard for your boss, or put it on a large screen in the open space, that&#8217;s beautiful. Cons: not mature. I&#8217;m working for years with technology that works. When I have a problem, I find the solution (blog posts, forums, mailing lists, support notes)&#8230; But with modern software, the first problems I encounter have a dead end in unresolved git issues. And I&#8217;m actually spending more time in finding workarounds than solving problems. Yes, Grafana is nice but is very far from what I can do with Excel in 5 minutes. However, when I find a workaround, I publish it to help others and hopefully find someone who has a better solution, so please leave a comment if what I do there is completely silly.<\/p>\n<h3>The problem to solve: IN() list in SQL from a multi-value variable<\/h3>\n<p>For this example I&#8217;ve created a <a href=\"https:\/\/console.cloud.google.com\/sql\/instances?hl=fr&amp;_ga=2.176241317.1215146593.1613680030-1358948016.1609170432\" target=\"_blank\" rel=\"noopener\">PostgreSQL database in Google Cloud SQL<\/a>, loaded <a href=\"https:\/\/github.com\/gvenzl\/sample-data\/blob\/master\/countries-cities-currencies\/install.sql\" target=\"_blank\" rel=\"noopener\">sample data from Gerald Venzl<\/a> and a <a href=\"https:\/\/grafana.com\/signup\/cloud\/connect-account\" target=\"_blank\" rel=\"noopener\">free grafana cloud service<\/a>. My goal is to get something like that where I can choose one, many, all or no country at all:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-231601-scaled-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-47658\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-231601-scaled-1.jpg\" alt=\"\" width=\"2560\" height=\"1396\" \/><\/a><\/p>\n<p>I can query the list of countries as:<\/p>\n<pre><code>\nselect country_id __value , name __text from countries order by 2\n<\/code><\/pre>\n<p>I alias my columns with &#8220;__value&#8221; and &#8220;__text&#8221; to show the country name to the user but get the country code from what she selected.<\/p>\n<p>So I&#8217;ve created the Grafana variable with this query, and selected &#8220;Multi-value&#8221; and &#8220;Include All option&#8221; to let the user chose any combination:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-47655\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg\" alt=\"\" width=\"2560\" height=\"1493\" \/><\/a><\/p>\n<p>Now, let&#8217;s try to use this variable, that I called &#8220;mylist&#8221; for the demo, in a SQL statement:<\/p>\n<pre><code>\nselect * from cities where country_id in ($mylist)\n<\/code><\/pre>\n<p>I&#8217;ll show the query generated for the different user combinations<\/p>\n<pre><code>\nselect * from cities where country_id in ('AND','ARE','AFG','ATG','ALB','ARM','AGO','ARG','AUT','AUS','AZE','BIH','BRB','BGD','BEL','BFA','BGR','BHR','BDI','BEN','BRN','BOL','BRA','BHS','BTN','BWA','BLR','BLZ','CAN','COD','CAF','COG','CHE','CIV','CHL','CMR','CHN','COL','CRI','CUB','CPV','CYP','CZE','DEU','DJI','DNK','DMA','DOM','DZA','ECU','EST','EGY','ERI','ESP','ETH','FIN','FJI','FSM','FRA','GAB','GBR','GRD','GEO','GHA','GMB','GIN','GNQ','GRC','GTM','GNB','GUY','HND','HRV','HTI','HUN','IDN','IRL','ISR','IND','IRQ','IRN','ISL','ITA','JAM','JOR','JPN','KEN','KGZ','KHM','KIR','COM','KNA','PRK','KOR','KWT','KAZ','LAO','LBN','LCA','LIE','LKA','LBR','LSO','LTU','LUX','LVA','LBY','MAR','MCO','MDA','MNE','MDG','MHL','MKD','MLI','MMR','MNG','MRT','MLT','MUS','MDV','MWI','MEX','MYS','MOZ','NAM','NER','NGA','NIC','NLD','NOR','NPL','NRU','NZL','OMN','PAN','PER','PNG','PHL','PAK','POL','PRT','PLW','PRY','QAT','ROU','SRB','RUS','RWA','SAU','SLB','SYC','SDN','SWE','SGP','SVN','SVK','SLE','SMR','SEN','SOM','SUR','SSD','STP','SLV','SYR','SWZ','TCD','TGO','THA','TJK','TLS','TKM','TUN','TON','TUR','TTO','TUV','TWN','TZA','UKR','UGA','USA','URY','UZB','VAT','VCT','VEN','VNM','VUT','WSM','XKX','YEM','ZAF','ZMB','ZWE')\n<\/code><\/pre>\n<p>This is what I have when the user selects &#8220;All&#8221; and that&#8217;s correct.<\/p>\n<pre><code>\nselect * from cities where country_id in ('BEL','NLD','LUX')\n<\/code><\/pre>\n<p>This is what I get when the user selects some countries,and this again is correct.<\/p>\n<pre><code>\nselect * from cities where country_id in ()\n<\/code><\/pre>\n<p>This is what I get when the user selects nothing. And I see no option in Grafana variables to disable this possibility. This is an invalid SQL syntax and gets, in PostgreSQL: pq: syntax error at or near &#8220;)&#8221;, MySQL would show: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216;)&#8217; at line 1, Oracle would show: ORA-00936: missing expression, SQL Server would show: Incorrect syntax near &#8216;)&#8217;. Grafana colorful charts are now less appealing when we get an non-user-friendly message like this. I need a workaround.<\/p>\n<h3>Not so advanced formats<\/h3>\n<p>I checked the <a href=\"https:\/\/grafana.com\/docs\/grafana\/latest\/variables\/advanced-variable-format-options\/\" target=\"_blank\" rel=\"noopener\">&#8220;Advanced variable format options&#8221;<\/a> with the hope that &#8220;advanced&#8221; options should have a format for the most common data query language which is SQL. But not. You have CSV, OpenTSDB, Doublequote, Graphite, JSON, Elasticsearch, Percentencode, Pipe, Raw, Regex, Singlequote, Sqlstring, Text, URL formats, but nothing about SQL! Yes, SQL can filter on regexp but I want index access, partition pruning which are possible with equality or IN() lists only.<\/p>\n<h3>Nested variables and SQL transformation<\/h3>\n<p>Here is my workaround. I&#8217;ve created a second variable, that will be hidden, to build the IN() list from the list of value. And because I have a SQL engine, I&#8217;ll use it to do the transformation:<\/p>\n<pre><code>\nselect case when length($$${mylist:singlequote}$$)&gt;0 then $$ in ($mylist:singlequote) $$ else ' is null ' end\n<\/code><\/pre>\n<p>Here I expand the previous variable with the &#8220;singlequote&#8221; format, which is the default for SQL queries. But I encapsulate it in a CASE statement. When the list is not empty, my variable builds the IN(&#8230;) list but when it is empty I choose to replace it with a IS NULL to let the user select unknown values. Of course you can decide the behaviour with a predicate that is always true or false.<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-233104.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-47661\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-233104.jpg\" alt=\"\" width=\"2322\" height=\"1410\" \/><\/a><br \/>\nThen here is my dashboard panel query:<\/p>\n<pre><code>\nselect * from cities where country_id ${mylist_sql:raw}\n<\/code><\/pre>\n<p>which expands to the same as when I used ${mylist} when the user chooses one, many, or all values.<\/p>\n<p>But when the user selects nothing:<\/p>\n<pre><code>\nselect * from cities where country_id is null\n<\/code><\/pre>\n<p>No error and the behavior I&#8217;ve chosen. Here no rows with no work because the optimizer knows that the primary key cannot be null.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . I&#8217;ve recently looked at Grafana. Pros: it is really nice, I mean aesthetically. If you want to build a dashboard for your boss, or put it on a large screen in the open space, that&#8217;s beautiful. Cons: not mature. I&#8217;m working for years with technology that works. When I have a [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":15767,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[2257,831,98,2258],"type_dbi":[],"class_list":["post-15765","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-administration-monitoring","tag-grafana","tag-list","tag-sql","tag-variable"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Grafana, SQL and IN() list for multi-value variable - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Grafana, SQL and IN() list for multi-value variable\" \/>\n<meta property=\"og:description\" content=\"By Franck Pachot . I&#8217;ve recently looked at Grafana. Pros: it is really nice, I mean aesthetically. If you want to build a dashboard for your boss, or put it on a large screen in the open space, that&#8217;s beautiful. Cons: not mature. I&#8217;m working for years with technology that works. When I have a [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-18T21:36:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2048\" \/>\n\t<meta property=\"og:image:height\" content=\"1194\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b\"},\"headline\":\"Grafana, SQL and IN() list for multi-value variable\",\"datePublished\":\"2021-02-18T21:36:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/\"},\"wordCount\":683,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg\",\"keywords\":[\"Grafana\",\"list\",\"SQL\",\"variable\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/\",\"name\":\"Grafana, SQL and IN() list for multi-value variable - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg\",\"datePublished\":\"2021-02-18T21:36:42+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg\",\"width\":2048,\"height\":1194},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Grafana, SQL and IN() list for multi-value variable\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"caption\":\"Open source Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Grafana, SQL and IN() list for multi-value variable - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/","og_locale":"en_US","og_type":"article","og_title":"Grafana, SQL and IN() list for multi-value variable","og_description":"By Franck Pachot . I&#8217;ve recently looked at Grafana. Pros: it is really nice, I mean aesthetically. If you want to build a dashboard for your boss, or put it on a large screen in the open space, that&#8217;s beautiful. Cons: not mature. I&#8217;m working for years with technology that works. When I have a [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/","og_site_name":"dbi Blog","article_published_time":"2021-02-18T21:36:42+00:00","og_image":[{"width":2048,"height":1194,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg","type":"image\/jpeg"}],"author":"Open source Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Open source Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b"},"headline":"Grafana, SQL and IN() list for multi-value variable","datePublished":"2021-02-18T21:36:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/"},"wordCount":683,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg","keywords":["Grafana","list","SQL","variable"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/","url":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/","name":"Grafana, SQL and IN() list for multi-value variable - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg","datePublished":"2021-02-18T21:36:42+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-02-18-220732-scaled-1.jpg","width":2048,"height":1194},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/grafana-sql-and-in-list-for-multi-value-variable\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Grafana, SQL and IN() list for multi-value variable"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","caption":"Open source Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/15765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=15765"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/15765\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/15767"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=15765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=15765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=15765"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=15765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}