title: Shiny text output to update at the end of SQL query
body: <p>I have a problem that has been discussed in different ways here but apparently not to face my quite simple need.</p>
  
  <p>I have a simple app that makes a call to an SQL database. I use a button to launch the query.
  I would simply need a text showing "click on button" to download at the very beginning. 
  Once a user clicks on the button, I would need this output text to show "Downloading the data, please wait".</p>
  
  <p>Once the query is completed and the data has been fully received, I would need the output text to show "Data downloaded successfully."</p>
  
  <p>I've seen <a href="https://stackoverflow.com/questions/36184568/r-shiny-how-to-update-a-textoutput-multiple-times-in-an-observer">some solutions</a> based off the progress bar but I cannot use it since I'm not going through a data.frame. I query the database and I don't know how long this could take.
  I've seen <a href="https://stackoverflow.com/questions/40997817/reactive-variables-in-shiny-for-later-calculations">other solutions</a> based off reactive values  but the text output in this case should react based on the size of the dataframe (0 rows and button clicked -> still downloading the data; >0 rows and button clicked "data downloaded successfully").</p>
  
  <p>Hence, I'm stuck here.
  This is my simple code but that ideally does what I would need.</p>
  
  <pre><code>ui &lt;- fluidPage(
    fluidRow(actionButton("download_btn", "Download Data")),
    fluidRow(textOutput(outputId = "load_data_status")),
    fluidRow(dataTableOutput("output_table"))
  )
  
  server &lt;- function(input, output) {
    cat("\n output$output_table = \n", output$output_table)
  
    data &lt;- eventReactive(input$download_btn,{
      output$load_data_status &lt;- renderText({ "Downloading data from Server. Please wait..." })
      # here I actually download the data from a database and this could take several seconds
      df &lt;- data.frame(mtcars)
      output$load_data_status &lt;- renderText({ "Data downloaded succesfully." })
      df
    })
  
    output$output_table &lt;- renderDataTable({
      data()
    })
  
  }
  shinyApp(ui, server)
  </code></pre>