LogicBlox 4.1.3

Release Date: July 17th 2014

What's New

Performance Improvements

  • The performance of, in particular, measure service rules has improved significantly due to a new rule optimizer heuristic.
  • Performance improvements can also be observed for short-running transactions.


  • New built-in for formatting floating point numbers as currencies:
    float:currency:string[x,y] = z -> string(x), float(y), string(z)
    Formats a float according to the locale identifier specified by the first parameter. Identifiers are interpreted by the underlying ICU implementation: http://userguide.icu-project.org/locale

    Example 10. 

    locales(x) -> string(x).
    result(x,y,z) <-


    -123.4 "@currency=EUR" "-123.40"
    -123.4 "@currency=USD" "-US$123.40"
    -123.4 "de_DE.UTF-8"   "-123,40 €"
    -123.4 "en_US.UTF-8"   "($123.40)"
    1234.5 "@currency=EUR" "1,234.50"
    1234.5 "@currency=USD" "US$1,234.50"
    1234.5 "de_DE.UTF-8"   "1.234,50 €"
    1234.5 "en_US.UTF-8"   "$1,234.50"


    Please note that currently you need to use 'en_US.utf8' to actually get the euro character. The $ character has no issue. This is caused by the boost locale library defaulting to US-ASCII instead of UTF8-8. This might be improved in a future release.

    Example 11. Additional examples

    "en_US"                   "$1,234,567.80"      
    "en_US.utf8"              "$1,234,567.80"      
    "en_US.utf8@currency=EUR" "€1,234,567.80"    
    "en_US.utf8@currency=USD" "$1,234,567.80"      
    "fr_FR"                   "1234567,80"         
    "fr_FR.utf8"              "1 234 567,80 €"
    "fr_FR.utf8@currency=EUR" "1 234 567,80 €"
    "fr_FR.utf8@currency=USD" "1 234 567,80 $US"
    "it_IT"                   "1.234.567,80"       
    "it_IT.utf8"              "1.234.567,80 €"  
    "it_IT.utf8@currency=EUR" "1.234.567,80 €"  
    "it_IT.utf8@currency=USD" "1.234.567,80 US$"  
    "nl_NL"                   "1.234.567,80"       
    "nl_NL.utf8"              "€ 1.234.567,80"  
    "nl_NL.utf8@currency=EUR" "€ 1.234.567,80"  
    "nl_NL.utf8@currency=USD" "US$ 1.234.567,80"  
    "sv_SE"                   "1234567:80kr"       
    "sv_SE.utf8"              "1 234 567:80 kr" 
    "sv_SE.utf8@currency=EUR" "1 234 567:80 €"

  • The following prefix, binary functions for comparison have been added for decimal type:
    • lt_3, le_3, ge_3, gt_3, eq_3 and ne_3
    Please refer to the LogicBlox Reference Manual for a complete overview of all the built-in predicates.

Measure Service

  • Entity types: Measures can now have entity typed values. New measure expression AS_ENTITY converts a primitive typed value to an entity value using the entity’s refmode. Filter comparisons can either work directly on entity values or on their associated refmodes.
  • Labeled levels and intersections: Consider a possible asymmetric affinity metric where affinity[past,predict] is intended to model how likely a consumer is to purchase sku predict after purchasing past. A model containing the this metric may be defined as follows:
    +measure:config:metric("affinity") {
    Note here that the the metric’s intersection contains labels past and predict which allows us to disambiguate the two occurrences of levels from the product dimension.
  • Parameterized query support: Measure service queries may now contain parameters which can be filled in with values from a relation in the workspace.

    Example 12. 

    Parameterization can be used, for example, to enable scrolling without installing new logic as position through the dataset changes.

  • Support for transforms in REMOVE messages: This feature allows developers to selectively remove positions that map up to a single member of a level.

    Example 13. 

    Transforms in REMOVE messages can for instance be used to remove positions from predicate Sales that have a value > 10 or filter based on access control specifications.

  • Basic structured error reporting: Error information is now reported via Problem messages in the Response message. For temporary backwards compatibility, the exception field will still be populated with the string ERROR if there was a fatal error. Problems can be report warnings as well as errors and may provide position or stack information.
  • Named expression metrics: It is now possible to give a measure expression a name by defining a new metric.

    Example 14. 

    In our configuration logic, that looks like:
    +measure:config:metric("SalesSouth") {
         """dice Sales by (filter Location.region.label by = "South")""",
  • Command line measure service administration: A command line administration option is added to refresh the measure service model.

    Example 15. 

    lb measure-service admin -u http://localhost:8080/ refresh


    The administrative options can be enable by setting measure:admin:allowed[]="true".

  • Escaped identifiers in text syntax: When writing queries in the text syntax an identifier containing arbitrary characters (whitespace, etc.) can be written via `....`.
  • Measure rule language abs builtin: The builtin function abs is now supported.
  • Aggregating recalcs with projections: In previous releases projecting a dimension was disallowed when aggregating a metric defined by measure rule language recalc. This restriction has now been relaxed. The projection is now allowed, as long as the variable corresponding to that dimension is only used as an argument to metrics in the recalc formula (and not predicates or comparisons).

Corrected Issues

The issues listed below have been corrected since the 4.1.2 release.

  • Resolved an issue that could lead to an 'Unexpected missing predicate' error when adding new logic.
  • Resolved an issue that could cause lb-server to crash under certain circumstances.

Installation and Upgrade information

Installation Instructions

Installing LogicBlox 4.1.3 is as simple as following the steps outlined below:

  1. Download the installation package.
  2. Extract the tarball in <YourPreferredInstallDirectory>
  3. Run the following command:
    source <YourPreferredInstallDirectory>/logicblox-4.1.3/etc/profile.d/logicblox.sh
    NOTE: this script will set all the necessary environment variables. You might want to add this command to your .bashrc.

Deprecated Features

  • Parameter terms Parameter terms are subsumed by parameter expressions, and will eventually be removed.
  • Exception field in Response: The exception field in the Response message has been deprecated. If there is an error processing a request it will now contain the string "ERROR" and the nature of the error will be recorded as a Problem message in the problem field.

Release Information

Table 7. 

Server requirements
Operating System: 64 bit Linux
Java Runtime Environment 1.7, update 11 or higher
Python 2.7 or higher