on package:DBFunctor
Defines the
RTable that the current operation will be applied
to.
An ETL operation applied to an RTable can be either an
ROperation (a relational agebra operation like join, filter
etc.) defined in
RTable.Core module, or an
RColMapping
applied to an
RTable
Connects an ETL Mapping to a left-deep ETL Mapping tree, of the form
A Left-Deep ETLOperation Tree
final RTable result
/
etlOp3
/
etlOp2 rtab2
/
A leaf-node --> etlOp1 emptyRTab
/
ETLMapEmpty rtab1
Example:
-- connect a Unary ETL mapping (etlOp2)
etlOp2
/
etlOp1 emptyRTab
=> connectETLMapLD etlOp2 emptyRTable prevMap
-- connect a Binary ETL Mapping (etlOp3)
etlOp3
/
etlOp2 rtab2
=> connectETLMapLD etlOp3 rtab2 prevMap
Note that the right branch (RTable) appears first in the list of input
arguments of this function and the left branch (ETLMapping) appears
second. This is strange, and one could thought that it is a mistake
(i.e., the left branch should appear first and the right branch
second) since we are reading from left to right. However this was a
deliberate choice, so that we leave the left branch (which is the
connection point with the previous ETLMapping) as the last argument,
and thus we can partially apply the argumenets and get a new function
with input parameter only the previous mapping. This is very helpfull
in function composition
Defines the column transformation function of a Column Mapping
Expression (
ColMappingExpr), the input
RTable that this
transformation will take place, an indicator (
RemoveSrcCol) of
whether the Source Columns will be removed or not in the new
RTable that will be created after the Column Mapping is
executed and finally, an
RTuple filter predicate
(
ByPred) that defines the subset of
RTuples that this
Column Mapping will be applied to. If it must be applied to all
RTuples, then for the last parameter (
ByPred), we can
just provide the following
RPredicate:
FilterBy (\_ -> True)
It is used to define an arbitrary binary operation on an
RTable
It is used to define an arbitrary unary operation on an
RTable
A grouping predicate clause. It defines an arbitrary function
(
RGroupPRedicate), which drives when two
RTuples
should belong in the same group.
Upsert matching condition subclause
The Relational Operation (
RelationalOp) is a Julius clause that
represents a
Relational Algebra Operation.
Union clause. Note this operation eliminates dublicate
RTuples
Union All clause. It is a Union operation without dublicate
RTuple elimination.
Aggregation Function type. An aggregation function receives as input a
source column (i.e., a
ColumnName) of a source
RTable
and returns an aggregated value, which is the result of the
aggregation on the values of the source column.
A generic binary operation on RTable
This exception means that we have tried to do some operation between
two
RTables, which requires that the structure of the two is
the same. e.g., an
Insert Into TAB RTuples, or a
UNION or toher set operations. By "structure", we mean that
the
ColumnNames and the corresponding data types must match.
Essentially what we record in the
ColumnInfo must be the same
for the two
RTables
Error message indicating the operation that failed.
This data type represents all possible aggregate operations over an
RTable. Examples are : Sum, Count, Average, Min, Max but it can be any
other "aggregation". The essential property of an aggregate operation
is that it acts on an RTable (or on a group of RTuples - in the case
of the RGroupBy operation) and produces a single RTuple.
An aggregate operation is applied on a specific column (source column)
and the aggregated result will be stored in the target column. It is
important to understand that the produced aggregated RTuple is
different from the input RTuples. It is a totally new RTuple, that
will consist of the aggregated column(s) (and the grouping columns in
the case of an RGroupBy).
Definition of Relational Algebra operations. These are the valid
operations between RTables