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
- 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 winwithin their parent topic. If that field is absent, no corresponding
away wintopic 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 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.