Retrieving Column Metadata on the Link (Java™ Integration stage)

The ColumnMetadata interface defines methods that are used to get the metadata such as column name, data type, and length associated to each column on the link. The column metadata that are associated with the Information Server DataStage® link can be retrieved by invoking the Link.getColumnMetadata(), the Link.getColumn(int) and the Link.getColumn(String) method.

Methods provided by ColumnMetadata interface
  • getDataElementName()
  • getDerivation()
  • getDescription()
  • getDisplaySize()
  • getIndex()
  • getName()
  • getNativeType()
  • getPrecision()
  • getScale()
  • getSQLType()
  • getSQLTypeName()
  • getType()
  • hasMicrosecondResolution()
  • isKey()
  • isNullable()
  • isSigned()
  • isUnicode()
The following example retrieves the name and SQL type of the first column on the link.
ColumnMetadata columnMetadata = m_inputLink.getColumn(0);
String columnName = columnMetadata.getName();
int sqlType = columnMetadata.getSQLType();