Using Topic Views 2: Mapping Topic Branches

Push Technology - July 9, 2019

Mapping from branch to branch

In the prior chapter we mapped single topics to another location, emulating the behaviour of the slave topic. In this chapter we will tackle something that slave topics struggle with: mapping a topic branch to another location.

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

      • Click Add and open the Topics tab.
      • Browse to the new topic branch Demos/Sportsbook/Football/England/All and see how this condenses all the topics from its neighbors into one place.

We have joined four branches of source topics into one branch of reference topics. Notice the // suffix to the topic selector in the source mapping clause. This is a descendant qualifier and can be read “this topic and all descendants”. Notice also the source path directive <path(5)> in the path mapping clause, this can be read as “Everything from the 5th part of the source topic” (NB: paths are zero indexed).

Summary: Combining a descendant qualifier in the topic selector, and a source path directive in the path mapping clause upgrades the topic view from mapping a discrete topic to mapping and joining whole topic branches.

Mapping from branch to branch, selectively

As their name implies, topic selectors can be selective. The prior example demonstrated mapping a whole topic branch. In this example, we will map specific parts of the source topic branch.

The English Football Association divides its professional teams into the Premier League, the Championship, League One and finally League Two. The following topic view will aggregate the bottom half of the professional teams:

  • Open the Topic Views tab.
  • Click Add and create a new topic view named England/Leagues.
  • Give it the specification: map ?Demos/Sportsbook/Football/England/League.*/ to Demos/Sportsbook/Football/England/Leagues/<path(5)>.

  • Click Add and open the Topics tab.
  • Browse to the new topic branch Demos/Sportsbook/Football/England/Leagues and see how this condenses Leagues One and Two into one place.

Summary: We can use the selectivity of the topic selectors to map specific parts of a topic branch, instead of all of it.

Next: Extracting source topic values.

The Diffusion® Intelligent Event-Data Platform makes it easy to consume, enrich and deliver event-data in real-time across all network conditions. 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 bring innovative products to market faster by reducing the software development efforts using the low-code features. The Diffusion® Intelligent Event-Data Platform is available on-premise, in-the-cloud, or in a hybrid configuration. 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.