Datomic Analytics (Preview)

Today's releases of Datomic Cloud and Datomic On-Prem preview a major new feature: analytics support.
With analytics support, your data scientists, analysts, and operations people can directly access Datomic using the languages and tools they already know (e.g. SQL, Python, R, Tableau, Metabase, Superset and more), without you having to do any ETL.
The analytics metaschema specifies a mapping from Datomic entities and attributes to dynamic SQL tables and columns, as shown in the example below:
In Cloud, the bastion server has been renamed to access gateway, as it now also supports analytics. Analytics support is automatic when you select an EC2 instance size that supports it, and costs nothing beyond the cost of the EC2 instance.
In On-Prem, analytics support is available via the bin/presto script in the distribution.
To learn more about the analytics preview:
..

Tuples and Database Predicates

Today's releases of Datomic Cloud and Datomic On-Prem include two major new features: tuples and  database predicates.

Tuples are a new compound data type, small vectors as values. You can use tuples to create multi-attribute unique keys on domain entities. You can also use tuples to optimize queries that otherwise would have to join two or more high-population attributes.

  • If you declare a composite tuple, Datomic will automatically populate the tuple from existing attributes. 
  • You can also define your own homogeneous or heterogeneous tuple types that you populate as you see fit.
Database predicates are functions and attribute lists that constrain the values accepted by transactions.
  • Attribute predicates are declared in schema and constrain the values taken on by a single attribute, in all contexts.  For example, you could limit a test/grade attribute to the range 0-100.
  • Entity specs comprise lists of required attributes and/or predicates of the entity and the post-transaction db. You can use entity specs to ensure properties across different attributes of an entity or even across entities.  For example, you might enforce that a game player's score/lowest must be less than or equal to their score/highest.  You must explicitly call for entity specs in transactions in which you want them to apply.
To learn more about tuples, database predicates, and other enhancements:


..

Return Maps

Most Datomic queries return tuples, but sometimes you just want maps.  Today's release of the Datomic Cloud client library adds return maps to Datomic datalog.  For example, the following query uses the new :keys clause to request maps with :artist and :release keys:

[:find ?artist-name ?release-name
:keys artist release
:where [?release :release/name ?release-name]
[?release :release/artists ?artist]
[?artist :artist/name ?artist-name]]

Running against the mbrainz-sample database, this query returns:

#{{:artist "George Jones" :release "With Love"}
{:artist "Shocking Blue" :release "Hello Darkness / Pickin' Tomatoes"}
{:artist "Junipher Greene" :release "Friendship"}
...}

To try return maps, you can


..

HTTP Direct for Datomic Cloud



    Datomic Cloud is designed to be a complete solution for Clojure application development on AWS. In particular, you can implement web services as Datomic ions behind AWS API Gateway.

    The latest release of Datomic Cloud adds HTTP Direct, which lets you connect an API Gateway endpoint directly to a Production Topology Compute Group as shown below: 



    HTTP Direct provides better performance and simpler operation than AWS Lambda Proxy Integration. The latter option continues to be supported on the Solo Topology, which does not include the Network Load Balancer required for HTTP Direct.

    To try out HTTP Direct:
    1. Get the latest release of Datomic Cloud.
    2. Work through the HTTP Direct Tutorial.


    ..

    Valcache for Datomic On-Prem

    Everything gets better when data moves closer to processing. Datomic can extensively cache its immutable data without concern for coordination or invalidation. With the 'valcache' feature in today's Datomic On-Prem release you can use your local SSDs as large, durable per-process caches, on both transactors and peers. Valcache can improve performance, reduce the read load on storage and stay hot across process restarts.




      To get started with Valcache for  Datomic On-Prem:

      ..


      1 of 11