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.
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.
References |
||
---|---|---|
Name |
Properties |
Documentation |
functions
|
Cardinality: [0..*]
Containment
|
Aggregated ColumnFunctions |
groupByClause
|
Cardinality: [0..1]
Containment
|
The GroupBy clause which includes the GroupBy columns |
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.
References |
||
---|---|---|
Name |
Properties |
Documentation |
functions
|
Cardinality: [0..*]
Containment
|
Aggregated ColumnFunctions |
groupByClause
|
Cardinality: [0..1]
Containment
|
The GroupBy clause which includes the GroupBy columns |
orderByVariable
|
T: VARIABLE
Cardinality: [0..1]
|
References |
||
---|---|---|
Name |
Properties |
Documentation |
ultimateSourceCube
|
Cardinality: [0..1]
|
References |
||
---|---|---|
Name |
Properties |
Documentation |
sourceStructVariable
|
Cardinality: [0..1]
|
|
targetStructVariable
|
Cardinality: [0..1]
|
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.
References |
||
---|---|---|
Name |
Properties |
Documentation |
ultimateSourceCube
|
Cardinality: [0..1]
|
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.
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 |
ignores
|
T: IgnoreColumn
Cardinality: [0..*]
Containment
|
an IgnoreColumn for each column we want to ignore |
renames
|
T: RenameAs
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. |
References |
||
---|---|---|
Name |
Properties |
Documentation |
arraySourceColumn
|
Cardinality: [0..1]
|
|
indexColumn
|
T: VARIABLE
Cardinality: [0..1]
|
|
targetStructColumn
|
Cardinality: [0..1]
|
References |
||
---|---|---|
Name |
Properties |
Documentation |
columnToUnpack
|
Cardinality: [0..1]
|
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.
References |
||
---|---|---|
Name |
Properties |
Documentation |
whereClause
|
T: WhereClause
Cardinality: [0..1]
Containment
|
A WhereClause clause representing the filter condition |
References |
||
---|---|---|
Name |
Properties |
Documentation |
renameAsStructColumn
|
Cardinality: [0..1]
|
|
structClass
|
Cardinality: [0..1]
|
|
structColumn
|
Cardinality: [0..1]
|
An SQLView which represents a custom transformation.
References |
||
---|---|---|
Name |
Properties |
Documentation |
groupByClause
|
Cardinality: [0..1]
Containment
|
A custom groupby clause |
selectClause
|
T: SelectClause
Cardinality: [0..1]
Containment
|
A custom select clause |
whereClause
|
T: WhereClause
Cardinality: [0..1]
Containment
|
A custom where clause |
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
|
T: VARIABLE
Cardinality: [0..*]
|
the columns to group by |
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
|
T: VARIABLE
Cardinality: [0..1]
|
the column to Ignore |
cube
|
Cardinality: [0..1]
|
the cube with the column to ignore. |
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.
References |
||
---|---|---|
Name |
Properties |
Documentation |
ignores
|
T: IgnoreColumn
Cardinality: [0..*]
Containment
|
an IgnoreColumn for each column we want to ignore |
renames
|
T: RenameAs
Cardinality: [0..*]
Containment
|
A rename for each column we wish to rename |
whereClause
|
T: WhereClause
Cardinality: [0..1]
Containment
|
A WhereClause clause representing the join condition |
References |
||
---|---|---|
Name |
Properties |
Documentation |
groupingVariable
|
T: VARIABLE
Cardinality: [0..1]
|
|
sourceStructVariable
|
Cardinality: [0..1]
|
|
targetArrayVariable
|
Cardinality: [0..1]
|
References |
||
---|---|---|
Name |
Properties |
Documentation |
targetVariable
|
Cardinality: [0..1]
|
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
|
T: VARIABLE
Cardinality: [0..1]
|
the Column from the source cube that we choose to Rename in the resulting View |
toVariable
|
T: VARIABLE
Cardinality: [0..1]
|
What Column would we like to use instead. |
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.
Attributes |
||
---|---|---|
Name |
Properties |
Documentation |
VTL_Code
|
T: EString
Cardinality: [0..1]
|
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
|
T: VARIABLE
Cardinality: [0..*]
|
Column |
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.
A module of SQLViews with a version number
References |
||
---|---|---|
Name |
Properties |
Documentation |
sqlViews
|
T: SQLView
Cardinality: [0..*]
Containment
|
The SQLViews in the module. |
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 |