public java.lang.String getSrcColList( java.lang.String pStart,
java.lang.String pUnMappedPattern,
java.lang.String pMappedPattern,
java.lang.String pSeparator,
java.lang.String pEnd)
This method available in LKMs and IKMs, returns properties for a list of columns. This list includes all the columns of the sources processed by the LKM (from the source) or the IKM (from the staging area). The list is sorted on the column position in the source tables.
The properties displayed depend on whether the column is mapped or not. If the column is mapped, the properties returned are defined in the pMappedPattern pattern. If the column is not mapped, the properties returned are defined in the pUnMappedPattern pattern.
The attributes usable in a pattern are detailed in "Pattern Attributes List". Each occurrence of the attributes in the pattern string is replaced by its value. Attributes must be between brackets ([ and ]). Example: "My string [COL_NAME] is a column".
The pMappedPattern or pUnMappedPattern parameter is interpreted and then repeated for each element of the list. Patterns are separated with pSeparator. The generated string begins with pStart and ends with pEnd.
If there is a journalized datastore in the source of the interface, the three journalizing pseudo columns JRN_FLG, JRN_DATE,and JRN_SUBSCRIBER are added as columns of the journalized source datastore.
Parameter |
Type |
Description |
---|---|---|
pStart |
String |
This sequence marks the beginning of the string to generate. |
pUnMappedPattern |
String |
The pattern is repeated for each occurrence in the list if the column is not mapped. |
pMappedPattern |
String |
The pattern is repeated for each occurrence in the list, if the column is mapped. |
pSeparator |
String |
This parameter separates patterns. |
pEnd |
String |
This sequence marks the end of the string to generate. |
The following table lists different parameters values as well as their associated description.
Parameter value |
Description |
---|---|
I_COL |
Internal identifier of the column |
COL_NAME |
Name of the column |
ALIAS_NAME |
Name of the column. Unlike COL_NAME, this attribute returns the column name without the optional technology delimiters. These delimiters appear when the column name contains for instance spaces. |
COL_HEADING |
Header of the column |
COL_DESC |
Description of the column |
POS |
Position of the column |
LONGC |
Column length (Precision) |
SCALE |
Scale of the column |
FILE_POS |
Beginning (index) of the column |
BYTES |
Number of physical bytes in the column |
FILE_END_POS |
End of the column (FILE_POS + BYTES) |
IND_WRITE |
Write right flag of the column |
COL_MANDATORY |
Mandatory character of the column (0: null authorized, 1: not null) |
CHECK_FLOW |
Flow control flag of the column (0: do not check, 1: check) |
CHECK_STAT |
Static control flag of the column (0: do not check, 1: check) |
COL_FORMAT |
Logical format of the column |
COL_DEC_SEP |
Decimal symbol of the column |
REC_CODE_LIST |
List of the record codes retained in the column |
COL_NULL_IF_ERR |
Processing flag of the column (0 = Reject, 1 = Set to null active trace, 2= set to null inactive trace) |
DEF_VALUE |
Default value of the column |
EXPRESSION |
Text of the expression (as typed in the mapping field) executed on the source (LKM) or the staging area (IKM). If the column is not mapped, this parameter returns an empty string. |
CX_COL_NAME |
Not supported. |
ALIAS_SEP |
Separator used for the alias (from the technology) |
SOURCE_DT |
Code of the column's datatype. |
SOURCE_CRE_DT |
Create table syntax for the column's datatype. |
SOURCE_WRI_DT |
Create table syntax for the column's writable datatype. |
DEST_DT |
Code of the column's datatype converted to a datatype on the target (IKM) or staging area (LKM) technology. |
DEST_CRE_DT |
Create table syntax for the column's datatype converted to a datatype on the target technology. |
DEST_WRI_DT |
Create table syntax for the column's writable datatype converted to a datatype on the target technology. |
SCD_COL_TYPE |
Behavior defined for the Slowly Changing Dimensions for this column in the data model. |
MANDATORY_CLAUSE |
Returns NOT NULL if the column is mandatory. Otherwise, returns the null keyword for the technology. |
DEFAULT_CLAUSE |
Returns DEFAULT <default value> if any default value exists. Otherwise, returns and empty string. |
COL_DESC |
Description (comment) of the column. Quotes and double quotes are replaced with spaces. |
<flexfield code> |
Flexfield value for the current column. |
To create a table similar to a source file:
create table <%=odiRef.getTable("L","COLL_NAME",
"D")%>_F
(
<%=odiRef.getSrcColList("","[COL_NAME] [DEST_CRE_DT]","[COL_NAME]
[DEST_CRE_DT]",",\n","")%>
)