Selecting Drop down value and passing it to Hive

I want to select value from UI(drop down) and pass this value to Hive and generate table.


ui <- fluidPage(
  selectInput("inSelect", "Select Item:",
  tableOutput(outputId = "query")

server <- function(input, output) {
  output$query <- renderTable({
    drv <- JDBC("org.apache.hive.jdbc.HiveDriver",identifier.quote="`")
    conn <- dbConnect
    db <- dbGetQuery(conn, "show databases")
     query <-dbGetQuery(conn,
      "select * from table1
      where month>='2019' and Item= '{input$inSelect}'")

shinyApp(ui = ui, server = server)

I getting the user selection but unable to get output table. Once the drop down is selected no action takes place. Please any help would be greatly appreciated.

I am getting the query executed but its not based on drop down selection. It automatically takes dropdown first value and runs the query. Any help..

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.