User Tools

Site Tools


transformations:intervalmerge

This is an old revision of the document!


Interval merge

This action merges two tables based on whether a value in one table falls into a range specified by two values in another table.

The lower boundary of a range is inclusive, the upper is exclusive. Ranges can overlap.

Example

Table 1: Boundaries

Lower Upper Feels
0 15Cold
15 25Comfortable
25 99Hot

Table 2: Temperature in Toronto

Month High, C
Jan 0
Feb 0
Mar 4
Apr 12
May 19
Jun 24
Jul 27
Aug 26
Sep 23
Oct 15
Nov 9
Dec 3

Goal: find what it feels like in Toronto during a year.

Solution: merge using the "Interval merge" action where [Temperature in Toronto] is between [Lower] and [Upper].

Table: Result

Month High, C Feels
Jan 0Cold
Feb 0Cold
Mar 4Cold
Apr 12Cold
May 19Comfortable
Jun 24Comfortable
Jul 27Hot
Aug 26Hot
Sep 23Comfortable
Oct 15Comfortable
Nov 9Cold
Dec 3Cold
transformations/intervalmerge.1534340705.txt.gz · Last modified: 2018/08/15 09:45 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki