Blocks

Blocks allow users to reuse sections of Macro Language code and to parameterize values in that code for greater flexibility and power.

1010data's Macro Language has been the foundational tool for power users since the system first went live. Not only do our most capable clients use Macro Language to great effect, our own analysts use it to develop reports and analyses for our clients.

A basic Macro Language statement looks like this:

<sel value="store=1"/>

In other words, there is an element that outlines the general purpose of the action (<sel> ) and one or more attributes that tell the system exactly how to carry out the operation. In this case, we are selecting rows whose values in the store column equal 1. This simple but powerful formula made it possible for people who weren't necessarily programmers to perform highly sophisticated analyses on large sets of data.

However, there was a significant shortcoming: what if at some point in the future, a different value for store is needed? Or, even worse, what if the goal changes to select rows based on a different value and a different column altogether? In the past, whoever wrote the Macro Language query in question would simply have to edit their query to make the appropriate changes. However, thanks to developments in the Macro Language that have been taking place recently, this is no longer the case.

While making edits to the simple line of code above is not particularly challenging, queries beyond a certain level of complexity were more difficult. For instance, if that line was needed several times in the same query, the edits would have to be made every time it appeared. This paradigm also made sharing analyses with people who might care about different aspects of the same data more difficult.

With the inception of <block>, both of these shortcomings have been alleviated. First, <block> allows 1010data users to parameterize the values in their Macro Language code. <block> also creates a way for users to reuse snippets of Macro Language code as much as they want. There are some basic concepts and syntax one must grasp in order to use <block> correctly. However, once these basics are understood, the Macro Language becomes a much more powerful tool for 1010data query writers.