Using Topic Views 3: Extracting Source Topic Values

9 Jul 19

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.

Extracting source topic value

  • 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)>".

Adding topic view to extract a field from a topic.

  • Click Add and open the Topics tab.
  • Note the new topics underneath the team topic, for example: Demos/Sportsbook/Football/England/All/Didcot vs Middlewich Wanderers/away win. 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.

Browsing new child topics holding the value of field ‘away win’

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 Platform 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: Case Studies and Developer Resources