Refresh Button Widget not triggering DB Query Reader refresh in KNIME Hub Data App

Hi everyone,
I’m working on a Data App that includes a Refresh Button Widget used to reload data from several DB Query Reader nodes and then display the updated result in a Table View.

The refresh works correctly when I run the workflow inside KNIME Analytics Platform, but after deploying it to KNIME Hub, pressing the Refresh button does not update the database results shown in the Data App.

Here is the simplified structure of my workflow:

  • Component Input

  • Refresh Button Widget → CASE Switch

  • DB Query Reader nodes (SQL Server)

  • Joiner / Row Filter / Missing Value / Column Rename

  • More DB Query Reader → Joiner

  • GroupBy nodes

  • Table View (final output)

In AP, the Refresh button successfully re-executes the DB readers and updates the table.
But in KNIME Hub Data App, the data does not refresh at all.

I checked the flow variables generated by the button:

  • refresh_widget

  • refresh-button-timestamp

  • refresh-button-counter

These update correctly when the button is pressed.

However, it seems the DB Query Readers in the Hub environment are not re-executed unless a Flow Variable is directly bound to one of their parameters.

I’m not sure:

  1. Which parameter in DB Query Reader should be overridden via Flow Variable to force re-execution?

  2. Whether my Table View should be placed inside the same Component as the Refresh Button and DB Readers?

  3. If KNIME Hub caches DB Reader results unless a variable changes?

Any guidance, best practices, or example workflows showing how to properly implement a Refresh Button for reloading DB results inside a Data App would be greatly appreciated!

Thanks!

@lca50666 I am not sure which DB Query Reader you expect to be re-executed, but from your screenshot, it looks like node 61 (DB Query Reader) is not downstream of the Refresh Button.
Because of that, the refresh will not trigger it.

If you want it to re-execute, you need to connect a flow variable from the Refresh Button (or other downstream node) to the DB Query Reader so it becomes part of the execution chain.

2 Likes

Sorry for not explaining it clearly earlier. I’ve added the screenshot above for clarification. The Refresh database action is mainly executed inside the circled component. I’ve tried the following approaches:

  1. Extending the component to perform the refresh internally.

  2. After the DB Writer, creating a new Microsoft SQL Server Connector to re-read the database table, then continuing with the subsequent nodes.

Both methods work correctly in KNIME Analytics Platform (AP), but the data does not refresh when running as a Data App. I’m wondering whether this is a bug caused by differences in how AP and Data Apps execute workflows.

Do you have suggestions on where I can test or verify the issue, and what steps I might take to improve or fix it?

Hi @lca50666,

After deploying the Data App on the Hub, you can use the Execution history (as in below screenshot) to debug this:

  • Open the latest run and click Inspect to see which nodes actually executed and where the flow stopped.
  • Before uploading a new version, fully reset the workflow in KNIME AP (no nodes in executed state), then deploy again.

Also, from your screenshot, it looks like node 20 writes to the DB. To confirm: do you have a DB Reader/DB Query Reader downstream of that (within the component) that re-reads the newly inserted data?

@k10shetty1
Hi, to help clarify the problem, I’m sharing the attached partial workflow. I cannot show the data due to privacy reasons, so this only illustrates the KNIME process. I can confirm the workflow executes in the Data App, but the refresh button/function does not respond when pressed.

forum.knwf (116.8 KB)

@lca50666
In the simplified example you shared, the Get Current Date&Time component will not be re-executed, as it is not downstream of the Refresh Button.

Could you please confirm the following:

  • Did you reset the workflow (no executed nodes) before uploading it to the Hub?
  • When clicking the Refresh button, is the component responsible for updating the DB actually executed?
    You can verify this via History → Inspect for the last run, as mentioned earlier.

As per the workflow, when the Data App is opened initially (before pressing Refresh), the component labeled “refresh db” should not run. After pressing the Refresh button, that component should execute, write new rows to dbo.md_mart_snapshot, update dbo.md_mart_change, and then the DB Query Reader (node 24) should read the newly updated data. Was the new entry added to dbo.md_mart_change?

Were you able to open the Inspect view and check how the execution flowed?
Specifically:

  • Did the DB Writer run?
  • What was the input to the DB Writer — did it contain the latest timestamp?

There should be no difference between local execution and Hub execution in this setup, so Inspect should help pinpoint exactly where the execution chain breaks.

2 Likes

@lca50666 not having reviewed the whole workflow, but as @k10shetty1 has said: you might at least have to connect the Date/Time creating with the Refresh Button:

1 Like