How to Pivot and Join Time Series Data in Flux

Merging multiple time series in InfluxDB using Flux may seem like a daunting task. Not anymore using this in-depth Flux tutorial, in which we will explain how to pivot, time shift, and join time series in InfluxDB.

In this InfluxDB tutorial, we will show you how to create an accurate overview of multiple time series with industrial data captured in consecutive production steps. Doing this requires a proper join mechanism for combining the time series into one after aligning them with respect to time.

Java14: Join Database Tables With Java 14’s New Record

Java14 Records in Joins

Did you know that you can join database tables into a Java Stream with Java 14's preview record feature? Read this short article and find out how it is done using the Speedment Stream ORM. We will start with how to set up your project.

You may also like: A First Look at Records in Java 14

Setup

Download Java 14. Go to the Speedment Initializer and download your project skeleton (including pom.xml). Modify the following lines in your pom.xml file.

Two Ways to Join String in Java 8: StringJoiner and String.join Examples

Joining multiple String literals or objects into one is a common programming requirement, and you will often find situations where you need to convert a list of String or a Collection of String into a CSV String for your application. For a long time, JDK API has no way to join multiple String literals or objects together, which forces programmers to write hacks like looping through all String objects and manually joining them using String concatenation to create the final, joined String. Even though this approach worked, it was filled with errors and hacks; you need to be careful not to add delimiter before the first element and after the last element, which often caused issues, particularly for new Java developers.

But the bigger problem with that approach was that everyone needed to re-invent the wheel. Since it was a very common requirement, you found many programmers writing the same routines and making the same mistakes, often ending in StackOverflow to solve their problems.  Thankfully, Java 8 solved this problem once for all.