If you looking for finding the metadata/mapping information for column name and alias column used in view, then you can use the below system procedure to get the required information.
- /lib/resource/GetColumnDependencies
This procedure retrieves the column dependencies of the specified view. The analysis is done based on the view definition, independently of whether the view is cached or not. Below are input/output details for this procedure.
Inputs:
resourcePath: The path of the resource to be analyzed. The supported resource types are Composite SQL Views in plain or published form.
columnFilter: A comma-separated sequence of case-insensitive column names, indicating the columns whose dependencies should be analyzed. Empty string (space) or null indicate all view columns. This parameter is optional.
ignoreCaches: true if the analysis should ignore whether depended resources are cached or not; otherwise, false. The default is false.
recursively: true if the analysis should be performed recursively all the way down to the base-level dependencies; otherwise, if the analysis should be performed at a single dependency level, false.
Outputs:
A cursor whose rows encode column dependencies, having the following columns:
columnName: The name of the resource column having the column dependency encoded in the row.
dependencyDatasourcePath: The path to the data source containing the resource owning the dependency. Empty if not applicable.
dependencyDatasourceType: The type of the data source containing the resource owning the dependency. Empty if not applicable. The set of data source types consists of all the data source adapter names accepted by TDV.
dependencyResourcePath: The path to the resource owning the dependency. Empty if not applicable.
dependencyResourceType: The type of the resource owning the dependency. Empty if not applicable.
The set of table or procedure resource types accepted by TDV is as follows:
Database
Table
Delimited File
Excel Table
Composite SQL View
System
Table
SAP RT Table
SAP RFC Table
SAP AQ Query Table
SAP Infoset Query
Table
Siebel Table
Database Stored Procedure
Packaged Query
Java
Procedure
Web Service Operation
Composite SQL Script Procedure
XQuery
Procedure
XSLT Procedure
Transform Procedure
Basic Transform
Procedure
Stream Transform Procedure
XQuery Transform Procedure
XSLT Transform
Procedure
dependencyIdentifier: The column name if the dependency is on a column;otherwise, a literal.
dependencyKind: One of the following:
column, to indicate a dependency on a column.
literal, to indicate a dependency on a constant value.
parameter, to indicate a dependency on a dynamic value provided at runtime.
derivationKind: One of the following:
direct, to indicate that the value of the dependency is preserved by the dependent column
indirect, to indicate that the value of the dependency is transformed by the dependent column
cardinalityInfo: When applicable, one of the following:
aggregate, toindicate that an aggregate function is involved in the derivation of the dependent column
analytic, to indicate that an analytic function is involved in the derivation of the dependent column
derivations: When the dependent column is not a direct projection of the dependency, this field denotes how the dependent column is derived.
position: The line number and column number of the dependency formatted as "[line number],[column number]"
Exceptions:
IllegalArgumentException: If the viewPath is malformed, the specified resource cannot be found, or it is impacted.