KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy Dashboard streaming analytics filtering

  • Dashboard streaming analytics filtering

    Posted by trinity on November 1, 2024 at 5:25 am

    Is it possible to subscribe to a table with filtering through KX Dashboards streaming data source? .u.sub can allow for filtering, and I would like to filter the subscription on KX Dashboards side too and I’m wondering what I need to change. I.e. do I need to change .u.snap, and where can I put in the filter criteria as a parameter?

    trinity replied 5 days, 20 hours ago 2 Members · 5 Replies
  • 5 Replies
  • khennessy

    Member
    November 8, 2024 at 2:49 pm

    Hi,

    Hopefully I can help answer your question below here:

    1. Overview of Streaming

    This is a very useful video about how Streaming queries are set up : KX Dashboards | Streaming Data – YouTube

    2. Demo Streaming with Filtering

    If you have KX Dashboards installed (https://code.kx.com/dashboards/gettingstarted/)

    Then navigate to the “Demo Stream” Dashboard, there is a build in example where we pass in a parameter to the streaming model that filters the returning data set .

    Therefore:

    1. On load – we subscribe to the using the default filter

    2. If we change the viewstate, we then unsubscribe and the re-subscribe using the new filter

    • trinity

      Member
      December 18, 2024 at 10:16 pm

      @khennessy Just bumping this to your attention

  • trinity

    Member
    December 10, 2024 at 12:29 am

    I’m not sure if I’m on a different version of dashboards or have done something differently, but I do not get the .sub graph looking subscription option to subscribe to, instead it looks like a table. When I add a symbol for example as the parameter x, it doesn’t work as expected – it instead starts returning empty schema table for a different subscribable table. I would expect this to start a subscription to just that sym.

  • trinity

    Member
    December 10, 2024 at 12:32 am

    As for the stream demo, the only instance of using a parameter that I see is when builder is used, and i would rather avoid using builder if possible.

    • trinity

      Member
      December 10, 2024 at 12:39 am

      I think there must be something i need to change in my .u.snap code perhaps? I can subscribe to the table for just a specific symbol, however the schema seems to be corrupted in the process

Log in to reply.