The market response to the launch of Riak TS has been outstanding! The timing of the launch was fortuitous but the market also knows that Riak is suited to production enterprise time series projects due to its ability to scale and its resilience. These factors are key to success with time series projects. It also helps that customers, such as Temetra, have already successfully extended Riak for time series use cases. Based on the outstanding response we are devoting considerable engineering resources to the product and we are announcing that Riak TS 1.1 is now available.
Riak TS 1.0, the first commercial enterprise NoSQL database optimized for time series use cases, provided the ability to create tables and query them using SQL. It automatically co-locates, replicates, and distributes time series data across the cluster to achieve fast read and write performance and high availability. Additionally, it’s masterless architecture enables near-linear scale using commodity hardware so you can easily add capacity as your time series data grows, making it the perfect choice for IoT sensor/device data, IT metrics, financial markets data, scientific observations or any other time-stamped data feeds.
Riak TS 1.1 is now available and updates include extended SQL support, Spark support and additional client support.
Highlights for Riak TS v1.0 features
- Data Co-Location — Co-location and the ordering of data based on a composite key, Riak TS can service queries from a tunable number of partitions. This allows the system to avoid the expensive coverage queries that would be necessary if you were to use secondary indexes to perform the same sort of query.
- Schema definition — You can define tables and specify their schema using the CREATE table command.
- Write Data — You can write data into Riak TS using the Java, Python and Erlang clients. Data written in Riak TS is co-located based on a composite key which allows for rapid querying of time series data using time ranges.
- Query Data — You can query data written into Riak TS, whether it is a single data point or range queries using the SQL SELECT command. You can filter data returned by any column using the WHERE clause.
Highlights for Riak TS v1.1 features
- Aggregations — Functions like count, sum, avg, min, max or stddev in your SQL SELECT statement WHERE clause are now supported.
- Arithmetic operations — Operations like +, -, /, * and () can now be in a SQL SELECT /WHERE.
- Create Table via client — Clients can now create tables directly using a SQL CREATE TABLE command.
- Dynamic Schema Discovery — Query a table with SQL DESCRIBE to get the schema
- Additional Clients —Node.js and Ruby clients are now also available.
- Analyze Data with Spark — The Riak TS Spark Connector allows you to efficiently write to, read from and analyze data from Riak TS and includes support for SparkSQL and DataFrames
Aggregations
Common aggregations, such as count, sum, avg, min, max or stddev are now supported in Riak TS v1.1. For example, you can run the following query to return the average temperature observed in month of January in the suburb of Bandra in Mumbai
Select avg(temperature) from WEATHER where city = 'Mumbai' and location = 'Bandra' and time >= 1451606400000 and time <= 1454284800000
Often for time series data, individual data points are less valuable than aggregates after a certain period of time. With Riak TS v1.1 built-in aggregations allow customers to easily operate on time series data stored in Riak TS.
Arithmetic operations
When you need to perform calculations on data retrieved via a Riak TS SQL statement, you use arithmetic expression. An arithmetic expression can contain numeric literals, addition, subtraction, multiplication, division, and negation. For example, if temperature sensor was mis-calibrated by a degree, you can run the following query:
Select temperature+1 from WEATHER where city = 'Mumbai' and location = 'Bandra' and time >= 1451606400000 and time <= 1454284800000
With these arithmetic operations, you can perform basic arithmetic operations on time series data then querying the data to perform quick calculations.
Create Table via client
In Riak TS version 1.1, we have added the ability for a client to create a table. For example, consider the following for the Python client:
table = 'WEATHER' fmt = """CREATE TABLE {table} ( city varchar not null, location varchar not null, time timestamp not null, weather varchar not null, temperature double, PRIMARY KEY((myfamily, myseries, quantum(time, 2, 'h')), myfamily, myseries, time)) """ query = fmt.format(table=table) ts_obj = client.ts_query(table,query)
Instead of creating tables from the command line, this feature improves ease of use of Riak TS by allowing customers to perform all of the supported operations from the Riak clients.
Dynamic Schema Discovery
We have extended our support for SQL commands to include the ability to query to get the table schema.
For example, you can run the following query to return the schema of the WEATHER table
DESCRIBE WEATHER;
This feature enables customers to retrieve table schema after it has been defined. This is beneficial when the schema must be examined after initial development, or used in integrations such as Apache Spark
Supported Platforms
Riak TS is supported on the following platforms
- RHEL/CentOS 6
- RHEL/CentOS 7
- Ubuntu 12.04 LTS
- Ubuntu 14.04 LTS
- Debian 7 (development only)
- OSX 10.8+ (development only)
Get Started Now with Riak TS
- You can find more about Riak TS on our website here
- Learn more about developing with and deploying Riak TS here
- Read the Riak TS Release notes here
For a demo or to talk to one of our Time Series Solution Architects, please contact us. If you have any feedback on Riak TS that you’d like to discuss with me please reach out via twitter.
Seema Jethani
Riak Product Manager
@seemmaj