Using Topic Views 3: Extracting Source Topic Values

Martin Cowie - July 9, 2019

Extracting part of the source topic value

You may notice that the new topic branch created in the prior chapter Demos/Sportsbook/Football/England/All/  holds exclusively JSON topics. Using a source value directive we can selectively unpack the structure of those JSON topics to create new topics.

  • Open the Topic Views tab.
  • Click Add and create a new topic view named All/away win.
  • Give it the specification: map ?Demos/Sportsbook/Football/England/All// to "<path(0)>/away win" as "<value(/away win)>".

  • Click Add and open the Topics tab.
  • Note the new topics underneath the team topic, for example: Demos/Sportsbook/Football/England/All/Manchester United vs Arsenal . These topics contain the values of the field away win within their parent topic. If that field is absent, no corresponding away win topic is created.

Notice the new value mapping clause as <value(/away win)>, which extracts the field away win from the source topic in creating the reference topic. This is a JSON Pointer.

Using the value mapping clause, it is possible to expose a subset of a dataset to the audience to achieve greater data efficiency. The reference topics can have different topic permissions, enabling you to share a subset of the dataset with more liberal permissions.

Summary: Use the value mapping clause value() to extract parts of source topics into reference topics.

Next: Throttling reference topics.

The Diffusion Intelligent Data Mesh manages, optimizes, and integrates data among devices, systems, and applications. Push Technology pioneered and is the sole provider of real-time delta data streaming™ technology that powers mission-critical business applications worldwide. Leading brands use Push Technology to fuel revenue growth, customer engagement, and business operations. The products, Diffusion® and Diffusion Cloud™, are available on-premise, in-the-cloud, or in a hybrid configuration, to fit the specific business and infrastructure requirements of the applications operating in today’s mobile obsessed, everything connected world. Learn how Push Technology can reduce infrastructure costs, and increase speed, efficiency, and reliability, of your web, mobile, and IoT application.

Learn More: View Blog Posts and Developer Resources


Check out these other resources


Info Center

Case Studies, White Papers, and Tech Talk notes relating to Diffusion and the customers benefiting from using it.


Quick Start Guide

Step-by-step guide to getting started fast with Diffusion or Diffusion Cloud.


Diffusion Cloud

Get the facts and the details about our Diffusion Cloud platform.