João Machado
João Machado

Reputation: 163

How to load datasets in Dataiku Shiny based on partitions?

Trying to get an hold on how to skip some calculation steps since the flow zone in dataiku is working and I want to instantly have a certain dataset based on the partition "met_station_id_list". don't even know if it is possible to use dkuReadDataset in reactive expressions. But I have this and I am not succeeding:

shinyServer(function(input, output, session) {
  
  dataSelected <- reactive({
  
  req(input$ids)  # Ensure input$ids is available before proceeding
    PCM_data_filtered_IE <- dkuReadDataset("PCM_data_filtered_IE_test",
                 partitions = input$ids)
    
    PCM_data_filtered_IE
  }) 

#other stuff
})
shinyUI(
  page_navbar(
    
    title = "PCV tool",
    theme = bs_theme(bootswatch = "minty"),
    sidebar = sidebar(
      
      selectInput("ids", "met station id", choices = unique(met_station_id_list)),
#other stuff
})

I get this error:

Error in .getReactiveEnvironment()$currentContext() : Operation not allowed without an active reactive context. • You tried to do something that can only be done from inside a reactive consumer.

Upvotes: 0

Views: 70

Answers (0)

Related Questions