{"id":6071,"date":"2019-02-14T15:53:08","date_gmt":"2019-02-14T15:53:08","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=6071"},"modified":"2019-02-14T15:53:08","modified_gmt":"2019-02-14T15:53:08","slug":"apache-zeppelin-form-select-example","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/apache-zeppelin-form-select-example\/","title":{"rendered":"Apache Zeppelin Form Select Example"},"content":{"rendered":"<p>First option is the default, and the second option is the list of key-value pairs:<\/p>\n<pre lang=\"scala\">\nprintln(z.select(\"\", List((\"a\", \"B\"))))\n<\/pre>\n<p>If you want to get what the user picked, z.select will return it:<\/p>\n<pre lang=\"scala\">\nval selection = \n  z.select(\n    \"\", \n   listBuckets.map((b) => (b, b)).sorted\n  )\n\nif (selection != \"\") {\n    println(selection)\n}\n<\/pre>\n<p>You should also name these, especially if you want more than one. To do that, add another parameter up front:<\/p>\n<pre lang=\"scala\">\nval selection = z.select(\"tag\", \"\", listTags(dataset.toString))\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Apache Zeppelin Select Example<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[152,480,609],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/6071"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=6071"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/6071\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=6071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=6071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=6071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}