dtm_sql_views package

This package describes the set of SQLViews, each SQLView represents a DataSetTransformation which transforms data from one DataSet to another in an immutable side-effect free fashion. They use concepts from the well-known SQL StructuredQueryLanguage.

The transformed dataset is created just once by the transformation and then never amended (it is immutable)
The only data that can be used in the transformation is the data from the source dataset(s), so it cannot use anything else including
'global variables' (which do not exist in the compitational model, the only data created by the transformation is the data in the resulting transformed dataset,
no other data is created or affected so the transformations are side-effect free.

EPackage properties:
Namespace Prefix: dtm_sql_views
Namespace URI: http://www.eclipse.org/efbt/dtm_sql_views

AggregateEnrichmentView

An SQLView which represents a grouping of rows of the single source table of the associated table, according to a set of Columns, and creates extra column(s) which runs a specified aggregation function over the group. This is equivalent to the GroupBy commands in SQL such as select ccy, country, sum(amount) from trades, groupby ccy, country. The resulting table structure will be a column for each of the groupBy columns, with one column added per calculated column. There will likely be considerably less rows in the results of the view, for example if we are grouping on million trades by currency, there will be on row per unique currency in the results. All SQLViews are associated with a DerivedCube, the source Cubes for the view are defined by the source Cubes of the associated Cube.

Supertype:SQLView

References
Name
Properties
Documentation
functions
Cardinality: [0..*]
Containment

Aggregated ColumnFunctions

groupByClause
Cardinality: [0..1]
Containment

The GroupBy clause which includes the GroupBy columns

AggregateEnrichmentViewAndOrderBy

An SQLView which represents a grouping of rows of the single source table of the associated table, according to a set of Columns, and creates extra column(s) which runs a specified aggregation function over the group. This is equivalent to the GroupBy commands in SQL such as select ccy, country, sum(amount) from trades, groupby ccy, country. The resulting table structure will be a column for each of the groupBy columns, with one column added per calculated column. There will likely be considerably less rows in the results of the view, for example if we are grouping on million trades by currency, there will be on row per unique currency in the results. All SQLViews are associated with a DerivedCube, the source Cubes for the view are defined by the source Cubes of the associated Cube.

Supertype:SQLView

References
Name
Properties
Documentation
functions
Cardinality: [0..*]
Containment

Aggregated ColumnFunctions

groupByClause
Cardinality: [0..1]
Containment

The GroupBy clause which includes the GroupBy columns

orderByVariable
Cardinality: [0..1]

BaseViewIncorporatingDeltas

Supertype:SQLView

References
Name
Properties
Documentation
ultimateSourceCube
Cardinality: [0..1]

CastColumnView

Supertype:SQLView

References
Name
Properties
Documentation
sourceStructVariable
Cardinality: [0..1]
targetStructVariable
Cardinality: [0..1]

CopyView

An SQLView which represents a Copy of all rows of the single source cubw of the associated DereivedCube. The resulting Cube Structure will be the same as that source cube. The number of rows in the view will be the same as there were in the source cube.

Supertype:SQLView

DeltaAccumulation

Supertype:SQLView

References
Name
Properties
Documentation
ultimateSourceCube
Cardinality: [0..1]

EnrichmentView

An SQLView which represents a Copy of all rows of the single source cube of the associated DerivedCube, and adds one or more calculated columns. The resulting cube structure will be the same as that source cube, with one column added per calculated column, although we can choose to Rename some of the columns from the source cube if we wish.

Supertype:SQLView

References
Name
Properties
Documentation
functions
Cardinality: [0..*]
Containment

The ColumnFunctions describing how to derive the new columns. Note that their will be a one to one relationship between the rows in the resulting view and the rows in the source row. So the column function could
represent the addition of 2 columns in the source row for example.

ignores
Cardinality: [0..*]
Containment

an IgnoreColumn for each column we want to ignore

renames
Cardinality: [0..*]
Containment

A set of Renames, these are similar is concept to the AS command in SQL, e.g. in SQL select CCY as Currency from cube1, will mean that the cube structure of the resulting view has a column called Currency not CCY, and that cube1 naturally remains with having a column called CCY.

ExplodeArrayOfStructsView

Supertype:SQLView

References
Name
Properties
Documentation
arraySourceColumn
Cardinality: [0..1]
indexColumn
Cardinality: [0..1]
targetStructColumn
Cardinality: [0..1]

ExplodeStructView

Supertype:SQLView

References
Name
Properties
Documentation
columnToUnpack
Cardinality: [0..1]

FilterByConditionView

An SQLView which represents a Copy of all rows of the single source cube of the associated cube IF they meet a filter condition. The resulting cube structure will be the same as that source cube. The number of rows in the view will be the number of rows in the source table that meet the supplied condition.

Supertype:SQLView

References
Name
Properties
Documentation
whereClause
Cardinality: [0..1]
Containment

A WhereClause clause representing the filter condition

FilterByStructClassColumnView

Supertype:SQLView

References
Name
Properties
Documentation
renameAsStructColumn
Cardinality: [0..1]
structClass
Cardinality: [0..1]
structColumn
Cardinality: [0..1]

GenericView

An SQLView which represents a custom transformation.

Supertype:SQLView

References
Name
Properties
Documentation
groupByClause
Cardinality: [0..1]
Containment

A custom groupby clause

selectClause
Cardinality: [0..1]
Containment

A custom select clause

whereClause
Cardinality: [0..1]
Containment

A custom where clause

GroupByClause

This is equivalent to the Group By section in SQL such as select ccy, country, sum(amount) from trades, group by ccy, country. The resulting cube structure will be a column for each of the groupBy columns, with one column added per calculated column. There will likely be considerably less rows in the results of the view, for example if we are grouping on million trades by currency, there will be on row per unique currency in the results.

References
Name
Properties
Documentation
groupByColumns
Cardinality: [0..*]

the columns to group by

IgnoreColumn

Column to Ignore. Used in a JoinView if we dont want all the columns from the joined cubes to be in the resulting Views cube structure.

References
Name
Properties
Documentation
columnToIgnore
Cardinality: [0..1]

the column to Ignore

cube
Cardinality: [0..1]

the cube with the column to ignore.

JoinView

An SQLView which represents a join of rows of two source cubes of the associated table, according to a join condition. This is equivalent to joining 2 tables using SQL The resulting cube structure will be a column for each of the columns in the 2 source cubes unless we specify that we want to ignore columns or rename columns.

Supertype:SQLView

References
Name
Properties
Documentation
ignores
Cardinality: [0..*]
Containment

an IgnoreColumn for each column we want to ignore

renames
Cardinality: [0..*]
Containment

A rename for each column we wish to rename

whereClause
Cardinality: [0..1]
Containment

A WhereClause clause representing the join condition

MakeArrayOfStructsView

Supertype:SQLView

References
Name
Properties
Documentation
groupingVariable
Cardinality: [0..1]
sourceStructVariable
Cardinality: [0..1]
targetArrayVariable
Cardinality: [0..1]

MakeStructView

Supertype:SQLView

References
Name
Properties
Documentation
targetVariable
Cardinality: [0..1]

RenameAs

Column to rename in the resulting View. similar to AS in SQL. Particularly useful if a Join View would result in 2 columns with the same name

References
Name
Properties
Documentation
fromCube
Cardinality: [0..1]

The source cube containing the Column

fromVariable
Cardinality: [0..1]

the Column from the source cube that we choose to Rename in the resulting View

toVariable
Cardinality: [0..1]

What Column would we like to use instead.

SQLView

An SQLView represents a DataSetTransformation which transforms data from one DataSet to another in an immutable side-effect free fashion. They use concepts from the well-known SQL StructuredQueryLanguage.

The transformed dataset is created just once by the transformation and then never amended (it is immutable)
The only data that can be used in the transformation is the data from the source dataset(s), so it cannot use anything else including
'global variables' (which do not exist in the compitational model, the only data created by the transformation is the data in the resulting transformed dataset,
no other data is created or affected so the transformations are side-effect free.

Supertype:DataSetTransformation

Attributes
Name
Properties
Documentation
VTL_Code
T: EString
Cardinality: [0..1]

SelectClause

A Set of Functions representing a select clause in SQL

References
Name
Properties
Documentation
aggregateFunctions
Cardinality: [0..*]

Aggregating functions

basicFunctions
Cardinality: [0..1]

Non-aggregating functions

varaibles
Cardinality: [0..*]

Column

UnionView

An SQLView which represents a Union of multiple source cubes of the associated DerivedCube .The source cubes must have the same Structure. This is equivalent to Union of tables in SQL. The resulting cube structure will be the same as the source cubes and include all the rows from all the source cubes.

Supertype:SQLView

VersionedSQLViewsModule

A module of SQLViews with a version number

Supertype:VersionedFunctionalModuleLogic

References
Name
Properties
Documentation
sqlViews
Cardinality: [0..*]
Containment

The SQLViews in the module.

WhereClause

WhereClause contains a boolean function used in filters and joins. This is equivalent to where clause in SQL.

References
Name
Properties
Documentation
function
Cardinality: [0..1]
Containment

The boolean function